This question already has answers here:
eclipse error: glassfish\domains\domain1 does not exist
(8 answers)
Closed 6 years ago.
iam a complete newbie in this area and dont know what to do.
For a Java ee tutorial i have to install the GlassFish server on my Windows 7.
I have followed the instructions and installed the newest JDK.
After i have downloaded the GlassFish native installer with multilingual from this website
glassfish.java.net/download.html i pressed the exe and it starts to install, but after 30
seconds it stops and a window pops and says that the software was not correctly installed that i
have to do it again with the correct settings. The result of the tried install is that the GlassFish
installer creates a glassfish4 folder under c:/glassfish4 but the glassfish4 folder is complete empty.
The newest JDK is installed even so i did not know what to do. Than i choose to install the GlassFish
server 3 and everything worked fine. A glassfish3 folder was created under c:/glassfish3 and i have
installed the glassfish tools for eclipse. The problem here is that the glassfish3 installer did not create the domain1 folder. I followed the instruction given in this question
eclipse error: glassfish\domains\domain1 does not exist
but the command
glassfish-install-dir\bin\asadmin create-domain your-domain-name
doesnt work i get the same error message like the poster of this question that cmd gives path error.
I also tried to execute the glassFish4 installer exe as admin but it failed also.
Now i dont know what to and how to install the GlassFish4 server correctly it is so frustrating.
Please help!
Try running the following command:
glassfish-install-dir\glassfish\bin\asadmin.bat create-domain --adminport 4848 domain1
And then try to start it again.
I also faced the same problem few days back. Please follow the instruction.
Glass Fish Server may be searching for proper JDK before creating a domain.
You can download zip archive for glass fish server and unzip it and use it as server.
This zip file already will have default domain created.
If you want to install it. Then please follow the below mention steps.
Step 1.
Go to /glassfish/config
Step 2.
Open asenv.bat in editor and edit set AS_JAVA=""
Mention jre installation path properly. It should be till bin directory.
Step 3.
Save file and start glassfish server installation again.
Step 4.
Choose "Custom Installation" press next
Step 5.
Choose "Configure an existing installation"
Step 6.
Mention the older installation directory and follow the instructions.
Domain1 should be created.
Related
I am new to Intellij ide and i'm having issues running Glassfish 5 or any previous version on Intellij 2017 2.4.
After selecting New Project > Java Enterprise > Web Application i had to specify the application server, to which i selected the folder of glassfish 5, jdk is set to 1.8 and java ee to 7. So far so good, no errors and the project gets created. Then i have a greyed "play" icon next to GlassFish 5.0.0 in the upper right of the corner that says that i have to configure it, i click Edit Configurations and the Run/Debug Configurations opens up
Everything seems fine and when i click the "play" green button to start the server and run the project i have projectName:war exploded under Deployment and
[2017-09-26 08:47:57,836] Artifact testfornew:war exploded: Waiting for server connection to start artifact deployment...
Detected server admin port: 4848
Detected server http port: 8080
Exception in thread "main" java.lang.NullPointerException
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.initializeServiceLocator(AbstractModulesRegistryImpl.java:152)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.newServiceLocator(AbstractModulesRegistryImpl.java:144)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:218)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:224)
at com.sun.enterprise.module.single.StaticModulesRegistry.createServiceLocator(StaticModulesRegistry.java:88)
at com.sun.enterprise.admin.cli.CLIContainer.getServiceLocator(CLIContainer.java:217)
at com.sun.enterprise.admin.cli.CLIContainer.getLocalCommand(CLIContainer.java:255)
at com.sun.enterprise.admin.cli.CLICommand.getCommand(CLICommand.java:231)
at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:371)
at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:306)
at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:57)
Under output. Coming from Netbeans setting glassfish up was pretty straightforward, i've checked a couple of solutions online including this but they don't seem to work for me.
I was having the same problem and I found that it is caused by an issue with the JDK software. So the NullPointerException thrown at AsadminMain.java:57 can be solved by checking your system variables (PATH, JAVA_HOME). Be sure that they reference to an acceptable JDK supported by your GlassFish version. GlassFish 5.0 is certified to work with java sdk 8u144 as mentioned HERE: https://javaee.github.io/glassfish/doc/5.0/release-notes.pdf.
Be aware, the path may also contain a reference to an old SDK directory.
If you need more help, please post the results of calling echo %PATH% on your cmd.
In my case JDK 1.8.0_152 must be installed, path and java_home variables have to be configured AND JDK 9.X must be uninstalled. Without uninstall, the error persist.
Uninstall Java 9, stay with the version 8 update 162 and the jdk8. When you unistall the Java 9 your system variables (PATH, JAVA_HOME=C:\ProgramData\Oracle\Java\javapath) will update the 3 jar (java, javaw, javaws) in this path to Java version 8.
war exploded: Waiting for server connection to start artifact deployment...
Detected server admin port: 4848
Detected server http port: 8080
....
Assuming that you are certain that JDK has set well in your environment variables and you are using jdk 8 or lower-Well I read somewhere that java9 has issues with such configurations, maybe the issue has been solve but for my case I chose to avoid for now.
Download and extract GlassFish of your version. For my case I'm
using GlassFish 5.181.O on Intellij 2018.1 ultimate version
Start Intellij, and before opening any project, or rather close all projects that are open.
Click on configure, then settings. A new window will appear as shown below. I have marked the steps you need to follow in the image. I will also add some explanation here.
Under Application Servers, click on the + shown as step 2 on the image, here you need to specify you glassfish server, the folder where you extracted to.
Next, click on + shown in step 3 on the image to add the server modules.
Assuming all is a success upto this point, select all choices of as shown in step 4 on the image, apply changes and Ok.
I will explain about creating a new project because I'm not sure how you would handle an existing project but I guess you can use concepts here to figure out what you need to tweak.Create your new java ee or whatever application you are working on,
As shown on figure 2, assuming you are creating a Java EE app, Click on Java Enterprise, then check/tick Web Application and JSF
Under libraries, use library from Glassfish ... Installation didn't help much because I got null pointer exceptions., so I used Download as shown in figure 2. Click next and finish.
Automatically you will see GlassFish added to the project, run it from the IDE.
Edit
If you had done all of the above and still get some error like Null Pointer Exceptions. Do what #Jailson Evora says: Clear your systems from java 9 and install java 8 and make sure when you issue java -version on command line, the output is java 8
I had to uninstall both jdk9 and jdk10 and set my java_home back to jdk8_181
Unable to start tomcat based app with java 9 because of default "java.endorsed.dirs" option in catalina.sh.
-Djava.endorsed.dirs=/usr/local/share/tomcat/endorsed is not supported. Endorsed standards and standalone APIs in modular form will be supported via the concept of upgradeable modules.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Is there a work around for this?
You'll have to hack the script bin/catalina.sh to get this to work.
There are a bunch of lines like this in bin/catalina.sh:
exec "$_RUNJDB" "$LOGGING_CONFIG" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
...
Just remove the second of those lines (the one with -Djava.endorsed.dirs) in each case and you should be back in business.
I'm looking at improving those scripts so that -Djava.endorsed.dirs is not provided to the JVM when the value is empty (which should be the case if you are using Java 9).
UPDATE 2017-11-06
Looks like r1810284 should fix the endorsed.dirs problem. Expect this fix to be included in Tomcat 7.0.83 (or whatever the next 7.0.x version passes voting).
UPDATE 2018-03-07
The first official release of Apache tomcat 7.0.x that includes this fix is Apache Tomcat 7.0.84, voted stable on 2018-01-24.
The above issue was fixed with the later releases of Eclipse but Unfortunately, it appeared again with the release of Java 10. Here is my research :
Initially, I installed Java 10 and Eclipse Oxygen 3 which gave me the same error you mentioned in your question. But, at the moment I installed Java 9 and pointed my Apache tomcat runtime server to it, the error was gone.
In my case, what I did to answer the problem of Tomcat not running was to set Tomcat (version 7) with a lower Java version (e.g. Java 8).
Then, in startup.sh, shutdown.sh and catalina.sh I added the following:
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`;
This symptom can come about if you have a Tomcat Runtime using a JRE earlier than Java 9 and create and run a server with that runtime. Then edit the Tomcat Runtime to use Java 9 and try to start the server. What happens is that a "-Djava.endorsed.dirs" argument gets added to the launch configuration when the server was run with the earlier JRE. When running the server after the switch to Java 9, the "-Djava.endorsed.dirs" argument is seen as a user added VM argument and kept, resulting in the error.
The simplest way to fix is to recreate the server. You can also right click on the server in the servers view and select Open. In the window that opens, click the "Open launch configuration" link at the bottom of the General section. In the dialog that opens, switch to the Arguments tab and in the "VM arguments" section, edit out the "-Djava.endorsed.dirs" argument and click OK. You should be able to start the server now.
To fix this bug, you need to install/update the Eclipse Web Tools Platform (WTP) to version 3.9.4 or later.
Select Help > Install new Software...
Select or add following URL: http://download.eclipse.org/webtools/repository/oxygen
Check Web Tools Platform (WTP) 3.9.4
Select "Next" and follow instructions
Reconfigure the tomcat in eclipse.
In Run configurations -> Arguments -> VM arguments
try removing
-Djava.endorsed.dirs="C:\Program Files\Apache Software Foundation\Tomcat 8.5\endorsed"
You have to remove -
"-Djava.endorsed.dirs="/home/ttlaptop/Downloads/apache-tomcat-7.0.105/endorsed"
from run configurations, and then tomcat will start
I can't be sure but ..
Step 1 -- >
it worked for me, I just remove servers from eclipse
Step 2 -->
restarted and add server again (tomcat 7)
Tomcat v7.0 Server at localhost
when adding a jboss-eap-6.4 version server in Eclipse luna, i added the below home directory.
D:\jboss-eap-6.4.0\jboss-eap-6.4:
which contains all the subfolders (bin, bundles, docs, domain,modules, standalone etc).
But I am getting error : 'User must select a valid configuration'
If I am starting the server using command prompt it's happening properly.
D:\jboss-eap-6.4.0\jboss-eap-6.4\bin>standalone.bat -c standalone-full.xml
I am using jre6 in eclipse
Please advice.
I just had this problem, clicked in JBoss Community, JBoss AS 6.x and got the same error. Clicking in Download and install runtime... and it only gave me 6.0 and 6.1 option.
Then I returned to the Define a new server and, instead of JBoss Community, chose Red Hat JBoss Middleware and proceed to chose JBoss Enterprise Application Platform 6.x and voilĂ .
I had same issue and resolved the same by using following steps:
1) Open server view
2) right-click, new -> Server
3) Expand the "Red Hat JBoss Middleware" category and select the "JBoss Enterprise Application Platform 6.1+" server type.
4) Click 'next'
5) Keep the server marked as "Local" and controlled by "Filesystem and Shell Operations"
6) click next
7) Fill in the runtime's home directory, specifically, point to your unzipped eap6.3 folder.
Though I am running
Ms-SDK 7.1 command prompt in Admin mode, I am getting hadoop.dll access denied error causing hadoop build failure.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.8
.1:jar (module-javadocs) on project hadoop-common: ArchiverException: Error whil
e creating archive: Problem creating jar: C:\hdfs\hadoop-common-project\hadoop-c
ommon\target\hadoop-common-2.2.0\bin\hadoop.dll (Access is denied)
I thought it might be problem with JDK version so I have uninstalled jdk1.7. and insatlled jdk1.6.0_45 but still I'm getting permission error.
Can I simply avoid hadoop-common module and install other?
I just received this same error.
I solved it by adding security permissions to the file and every parent folder in the path back up to the root hadoop folder.
Just right-click on the folder/file you want to give permissions to and go to Properties. Then click the Security Tab. Next elect the logged in user and check the box marked full control. click Apply.
I had the same problem building Hadoop for Windows 7, even changing the permissions as suggested previously.
However, repeating the same steps and using the same versions on Windows Server, it worked properly.
As Hadoop developers says on the Hadoop Windows building guide [1], they have used Windows Server 2008, and "it is likely to work on Windows 7", but the permissions issue still remains.
[1]: https://wiki.apache.org/hadoop/Hadoop2OnWindows#line13 Hadoop 2 on Windows
Me too received this error. Tried giving full control on the root folder but still the problem persisted.
Could fix the issue after running chmod -R 777 <hadoop-common-folder> from the Windows SDK 7.1
Hope this helps some one.
This question already has answers here:
How do I prevent Eclipse from hanging on startup?
(36 answers)
Closed 6 years ago.
I have problem with running my Eclipse. I tried 3.7, 4.2 and 4.3 versions with java 6 and java 7. Nothing can help me. It shows me popup screen but it doesn't start to load( I dont have chance to choose workspace).
Starting it with -debug -console parameters shows that it stops running in this moment:
Time to load bundles: 10
Starting application: 6374
osgi>
I have started JVisualVM but I cannot observe anything special. There are no deadlocks etc.
Edit
My observations were to deep... After ~60s pid of eclipse is dead.
Edit 2
Now it stops on
Time to load bundles: 8
org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized. Will retry after the state location is initialized.
Starting application: 3557
Edit 3
I have managed to start it but only with -clean parameter and with choosing workspace from command line -data parameter.
Remove .snap (or .markers in Indigo) from .metadata.plugins\org.eclipse.core.resources.projects\\
I've had exactly the same problem and could solve it using the answer here https://stackoverflow.com/a/5504530/1275767 which works by moving the projects out of the workspace and back in again after Eclipse has been started and stopped.
Starting it with -clean -data started eclipse but whenever I switched the workspace using the eclipse gui it wouldn't load.
With Eclipse Kepler, you need to remove all of the .snap files within the .plugins directory, i.e. C:...\eclipse-jee-kepler-R-win32.metadata.plugins. Once I did that, everything started up fine. (NOTE: There are about 10 *.snap files total)
Couldn't solve these problems with any of the above options on mars or neon. Downgraded to Luna, which also happens to be the version that I had deleted previously. This worked for me.
Edit workbench.xml in the \workspace\.metadata\.plugins\org.eclipse.ui.workbench\ folder
remove all the coding in XML File in between <editor></editor> in the <editors></editors>
save the xml file and close the eclipse platform and restart your Eclipse and it should run properly
Tried all the above options, nothing worked. So I finally figured out the solution:
I removed all JRE installations in my C:\Program Files and C:|Program Files(x86) folders. Installed a new JDK 7 package, copied the fullpath of JDK7\bin folder and appended it at the end of the "Path" variable found under 'Environment variables' of my Windows 7 pc. Then restarted everything, so it worked.