I just downloaded the GlassFish 5.0 archive - Full Platform, unzipped it, I run it through the command line.
asadmin start-domain
problem:
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)
I tried to set the path in the file asenv.bat -> set path = C:/.../Java/bin - did not help. Tried so to launch: asadmin start-domain domain1 - did not help.
Installed: jdk-9.0.1 Also tried on the 8th, did not help. What to do???
OK, Glassfish 5.1 doesn't exist for the moment. Continue with Glassfish 5.0 with this solution:
Just set the AS_JAVA variable in your asenv.bat file located here: C:\DEVENV\glassfish5\glassfish\config.
File to edit: add last line
Relaunch your server....enjoy :
This looks to be this issue - https://github.com/eclipse-ee4j/glassfish/issues/22130.
GlassFish 5 does not work on JDK9, however GlassFish 6 works on JDK 11.
For me it didn't work what #Vifier Lockla did. I had to change the path/glassfish5/glassfish/config/asenv.conf file in a linux mint machine. At the bottom of the file the path of the jdk 1.8, i.e.
AS_JAVA="/usr/lib/jvm/jdk1.8.0_191"
GlassFish 5.1 also not working with Java 9 or later versions.
glassfish 5.1 also needs java 8 with the AS_JAVA hack in asenv.conf/bat file.
Edit asenv.bat put set AS_JAVA=/usr/lib/jvm/java-8-oracle
and asenv.conf AS_JAVA="/usr/lib/jvm/java-8-oracle"
It works
When you download the glassfish zip file from the internet and extract it.
Its a good practice to read the the readme file.
In my case the under the "prerequisites" title in the readme file, it specified: GlassFish 5.0 requires Oracle JDK 8 Update 144.
I downloaded and installed the JDK 8 update 144 as demanded. It worked instantly. I initially had JDK 14.0.2 and it was displaying the error #Aleksandr posted.
I made the same mistake as the OP, because the release notes said specifically "GlassFish Server Open Source Edition Release 5.0 requires Oracle JDK 8 Update 144 or later" under heading Required JDK Versions in release notes.
However what you can do is drop down each version to see which is the latest jdk version that glassfish 5 will be compatible with Or Just download Java SE Development Kit 8 from https://www.oracle.com/in/java/technologies/javase/javase8-archive-downloads.html.
You also have to add the java variable in asenv.bat as kindly commented by Vifier Lockla. Thanks to Vifier for the suggestion.
for me I changed to the directory where glassfish is
cd /opt
then
sudo glassfish5/bin/asadmin start-domain
I am sure this works
Related
I've a fresh install of netbean 11.1.
Now I'm trying to build a project but I get the following error output:
Cannot run program "cmd" (in directory "C:\projects\open"): Malformed
argument has embedded quote: "C:\Program
Files\NetBeans-11.1\netbeans\java\maven\bin\mvn.cmd"
cd C:\projects\open; "JAVA_HOME=C:\\Program Files\\Java\\jdk-11.0.5" cmd /c "\"\"C:\\Program Files\\NetBeans-11.1\\netbeans\\java\\maven\\bin\\mvn.cmd\" -DskipTests=true -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans-11.1\\netbeans\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 clean install\"" Cannot run program "cmd" (in directory "C:\projects\open"): Malformed argument has embedded quote: "C:\Program Files\NetBeans-11.1\netbeans\java\maven\bin\mvn.cmd" -DskipTests=true -Dmaven.ext.class.path="C:\Program Files\NetBeans-11.1\netbeans\java\maven-nblib\netbeans-eventspy.jar" -Dfile.encoding=UTF-8 clean install
I've build this project with netbeans 11.1 before but have a new pc.
and a fresh install, tho I'm sure there was no problem last time I tried to install everything.
Although this problem can be fixed by installing jdk1.8.0_221, but actually you don't need to downgrade your JDK. Just try these:
First exit netbeans IDE if it's open, then open netbeans configuration file from here: netbeans-Install-Dir/etc/netbeans.conf
(Note: for me netbeans-Install-Dir is C:\Program Files\NetBeans 8.2\etc)
Add the below arguments
-J-Djdk.lang.Process.allowAmbiguousCommands=true
to the beginning of the string that you find at this line:
netbeans_default_options="-J-client -J-Xss2m -J-Xms32m ......."
Sample screenshot as shown below:
4. Save the change and start your netbeans IDE.
I have checked the release notes for JDK 13.0.1 at https://www.oracle.com/technetwork/java/javase/13-0-1-relnotes-5592797.html#JDK-8221858
This behavior is a regression from a security fix for JDK-8221858 (not public). Follow the link for a full description. The fix is part of JDK 8u231, JDk 11.0.5, 13.0.1 etc.
To resolve this problem, append -J-Djdk.lang.Process.allowAmbiguousCommands=true to netbeans_default_options in <netbeans-dir>\etc\netbeans.conf.
I had this error with adopt8-hotspot (AdoptOpenJDK-1.8.0_232-b09) and sbt-0.13.X for an old project.
Problem solved after setting the environment variable in windows via
set JAVA_TOOL_OPTIONS=-Djdk.lang.Process.allowAmbiguousCommands=true
Did you by any chance install the latest critical update for java? jdk 1.7_241? I installed that today and was having the exact same problem. I downgraded my jdk version and it solved it completely.
EDIT: Apologies, I noticed you're using netbeans 11.1 so you probably have a later java version, in any case, you could try downgrading your java version to a previous release if you happened to update it today as the other version might have the same problem.
At the time that I'm writing, I had only JDK13 installed only on my machine. After unzipped my netbeans I've got the same problem with the internal maven of my netbeans 11.1.
Apparently netbeans 11.1 does not work properly with the JDK13. I just installed the JDK 8 and the problem now is solved, without any additional configuration or parameter change.
Nontheless, since I need the JDK13, I have both installed but my netbeans.conf file is pointing to JDK8. Later, you can define the new Java platform in netbeans project configuration.
I hope this might help.
Cheers!
just add -J-Djdk.lang.Process.allowAmbiguousCommands=true to netbeans_default_options in netbeans.conf
It seems to happen with all recently released jdk version (11.0.5 and 13.0.1 at least), even with the latest Netbeans 11.2vc1 (and witnessed on NB 11.1 too).
Downgrade your jdk to 11.0.4 or 13.0.0. It fixed the issue for me
The problem also occurs in version jdk-8u231. Fixing installing jdk-8u221 version
Apache NetBeans 11.1 does indeed not support JDK 13, that's what the upcoming Apache NetBeans 11.2 is for -- latest beta: bit.ly/apache-netbeans-11-2-beta-3
I had the same problem with oracle jdk 13.0.1 and netbeans 11.1, but it worked for me with openjdk 13.0.1 (https://jdk.java.net/13/).
I have formatted my Mac due to some storage issues. Before this, I used Eclipse in a proper way. Now i have installed the JDK
Then, i have installed Java
Until now everything seems to be correct but when I open the Eclipse installer...
What can I do to fix this? I need to work with this the soon as possible.
Thanks
Eclipse on macOS will not start with Java 14 installed, this is being tracked in Eclipse bug 561273.
Installing Java 8 as well does not help. You need to remove the Java 14 install. You could use the Java 13.0.2 release instead.
Eclipse have determined that the root cause of this issue is a change in Java 14 which is described in this bug report JDK-8238225. The fix for this should be in Java 14.0.1
Update: Eclipse runs fine with Oracle Java 14.0.1 so the issue has been fixed.
I also asked this question which was closed, that's why I answer what I have found out: Eclipse will not install on Mac OS Catalina 10.15.4, saying the above error message
Failed to create the Java Virtual Machine.
Deinstalling jdk and install an older one wouldn't help on its own because Eclipse is refusing to install in the first place (as mentioned above). What I have done:
i´ve installed an JDK with boost (you can try several, mine worked with Version 13)
I edited the installer:
Download the dmg file
convert the dmg-file with "hdiutil convert /dev/disk3s1 -format UDRW -o devimage"
mount the converted dmg-file with: "hdiutil attach -owners on devimage.dmg -shadow"
Edit the /Volumes/Eclipse/Eclipse.app/Contents/Info.plist: there is a section which is commented and there you can try the jdk version. You have to give the full path to the java executable, for example:
<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home/bin/java</string>
Then my eclipse started from the (already) mounted Eclipse image without complaining
I had the same issue myself a while back. In your Eclipsepedia it provided an example of what the eclipse.ini file looks like when your trying to specify a JVM. So just change the eclipse.ini file and then make sure that you have all of the correct documents in that path to match the example.
When I try to install NetBeans 8.0.2 on my PC (Win10-64bit) I get the error message:
despite that I already installed JDK 9.0.1, as evident in the command prompt:
My path variables are set as follows:
AFAIK Netbeans which supports JDK 9 is yet to release (i.e, Netbeans 9.0 which is in development mode).
And the documentation states this.
By: jkovalsky, 09 Oct 2017
If you have downloaded JDK 9 recently and try to convince your NetBeans 8.2 IDE to run on top of it we will probably disappoint you, because 8.2 version is not designed to work with JDK 9.
In order to use JDK 9 happily you will need to download a NetBeans 9.0 development build from Apache Incubator. For more information please read Geertjan Wielenga's post on Using Apache NetBeans IDE.
Thank you!
NetBeans team
I've also faced the same issue with Netbeans 8.2 (but you're trying with Netbeans 8.0.2). So, I installed JDK 8 and the Netbeans installation went fine.
Still if you want to use JDK 9 you can install it alongside with JDK 8. But you need to set JDK path as JDK 8 in the system path (like you did for JDK 9). While installing Netbeans select JDK 8 installation path as JDK for Netbeans.
I hope it'll be helpful.
As mentioned, you are getting error when trying to install NetBeans, in that case you can specify the JDK at command line
<netbeans_installer>.exe --javahome "C:\Program Files\Java\jdk1.9.0"
FaqSuitableJvmNotFound
Does installing JDK 1.7 remove JDK 1.5? Because when I tried to restart Tomcat which was using Java 1.5 I have got the below error:
/opt/tomcat/bin/catalina.sh: line 332: /usr/java/jdk1.5.0_22/bin/java: No such file or directory
Verified that this directory is gone. Tomcat services running fine until shutting down and attempting to restart last night. When trying to install Java 1.5 J have got the below error message:
Preparing... ########################################### [100%]
package jdk-2000:1.7.0_17-fcs.x86_64 (which is newer than jdk -2000:1.5.0_22-fcs.x86_64) is already installed"
Will installing JDK 1.7 remove JDK 1.5?
How do I install JDK 1.5?
It depends on how you installed (which package manager or if you used the self-extracting sh or unzip). Normally, no, they don't install over, they install alongside and simply replace symbolic links.
If you follow your symbolic links for java (which java | ls -l)... you'll find the install dir of the jdk1.7, and probably find 1.5 nearby.
You can download the JDK from the Oracle Java archive page and you can extract it to the required location to fix your problem.
http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase5-419410.html
Tried pdi-ce-4.1.0-stable and pdi-ce-4.2.0-stable
My Machine - Windows 7 64 bit
When I run Spoon.bat cmd line window appears and disappears and then nothing happens.
When I tried to run it from command line, I get
DEBUG: Using JAVA_HOME
DEBUG: _PENTAHO_JAVA_HOME=C:\Program Files\Java\jdk1.5.0_22
DEBUG: _PENTAHO_JAVA=C:\Program Files\Java\jdk1.5.0_22\bin\javaw
C:\pentaho\data-integration>start "Spoon" "C:\Program
Files\Java\jdk1.5.0_22\bin \javaw" "-Xmx512m" "-XX:MaxPermSize=256m"
"-Djava.library.path=libswt\win64" "-D KETTLE_HOME="
"-DKETTLE_REPOSITORY=" "-DKETTLE_USER=" "-DKETTLE_PASSWORD=" "-DKE
TTLE_PLUGIN_PACKAGES=" "-DKETTLE_LOG_SIZE_LIMIT=" -jar
launcher\launcher.jar -li b ..\libswt\win64
But then again the PDI GUI doesn't open. I have run the same on another 32 bit machine and it runs perfectly.
Their are few things which are not supportable by jdk which are 1.6 or lower then that, try to download jsk 1.7 and configure it may be your problem will solved, because i faced few errors in the past which are because of lower version of jdk.
I know it is an old commend, but maybe this can help someone.
you just need to replace all "JAVAW" to "JAVA", inside the .bat file.
It worked for me.
tks.
There seem to be a few folders missing when downloading community edition vs installing EE. Try to install both, and take the "ui" folder from EE and copy it to the CE folder. Running spoon.bat should work now. This worked for me, hope it helps.
I had the same problem yesterday with the same message after updating Java 7 Update 55.
Kettle: pdi-ce-5.0.1.A-stable
Windows 7 32 bits
Solved: I set the PENTAHO_JAVA_HOME variable to jr6 and now the spoon.bat opens.
Thanks for posting the problem and for all the hints above. I was using latest version of spoon with an older version of Java. when I ran spoon.bat in command line without the start.. it told me that the class file major.minor version is not supported. I installed latest version of Java (X64) and pointed my JAVA_HOME folder to the new folder and here you go... In my case the folder path was "C:\Program Files\Java\jre1.8.0_111". I copied UI folder too from EE to CE.
If you are using latest version of spoon then use the latest version of Java. I needed to add JAVA_HOME or JAVA_JRE variable pointing to the java's latest version folder on my system.