Our customers have reported an issue that with high probability is caused by an JRE update, closer determined JRE 7 update 65 (JRE 7u65). I was able to recreate this, the exception message I get is very unhelpful, looks like:
JNLPException[category: Launch File Error : Exception: null : LaunchDesc:
In Java Console output I see this:
Java Web Start 10.65.2.20
Using JRE version 1.7.0_65-b20 Java HotSpot(TM) Client VM
#### Java Web Start Error:
#### Could not find main-class se.linkon.sabine.clients.sabineclient.invoker.NBRunWrapper in .....
Do you have any clue what is wrong? Can this be a bug in JRE 7u65?
I have tested the application with JRE 7u55 and with this configuration the application works smooth. I have tested on a Windows 7 machine.
Best Regards
I just ran into the exact same problem moving from 1.7.0_60 to 1.7.0_67.
The solution in my case was that the main="true" attribute in the jnlp file was on the wrong jar. I verified that this didn't matter under 1.7.0_60 or earlier.
However, nowhere in the _65 or _67 release notes does it mention this. I suspect it's related to work for the -Entry-Point manifest attribute that's mentioned in the 1.8 stream release notes, but only Oracle could answer that.
Without any more details it is difficult to tell. There had been problems in that area NullPointerException in invokeLater while running through Java Webstart however its just taking stabs in the dark...
Related
I am trying to get log4j2 working in Netbeans. No matter what I do, I get the following errors
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/logging/log4j/LogManager
at java.lang.ClassLoader.defineClass1(Native Method)
...
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.LogManager
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)14
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
I am following the instructions here
Setting up log4j2
and trying to run the same demo program.
I have tried to find the solution and found this posting.
Similar Problem here
This post Class not found is an exact duplicate of my problem, but no effective answer was posted.
I have added log4j-core-2.8.2.jar and log4j-1.2-api-2.8.2.jar to the project Libraries. These two files are installed in a sub-folder of the main src folder so they are on the class path.
Netbeans is installed on a new Ubuntu build. The frustrating thing is that I was able to get this running on a Windows machine.
I tried creating a fresh new project with only this logdemo class. I added the log4j2 jar files to the Library. I also added the command -Dlog4j.configurationFile=/home/test/config/log4j2.xml
to the Run> VM Options box.
I still get exactly the same error message.
I checked my installation.
dazz#mimir:~$ java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
I found this post on setting Java Environment in Ubuntu. I would have thought that using apt-get would have setup the environment, but I may be wrong.
I checked /etc/environment . No mention of Java there.
No java path exported in .bash.rc either.
No java in /etc/profile.
There seems to be a number of places where the path can be set. I found this post Setting PATH variables in Ubuntu. It is modern and helpful.
I also found this post Setting Java path variables in Ubuntu
I added the following to my home profile ~/.profile
JAVA_HOME=/usr/lib/jvm/default-java
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH
Note the use of default-java. This is a symbolic link to the JDK. I hope that if/when I upgrade to the next version, apt-get will change the link.
After a reboot of Ubuntu to see if this fixed the problem, no change.
Any suggestions to find the cause of the problem would be welcome.
I installed Netbeans on my Windows 10 PC and still had the very same symptoms so I figured the problem must be with the jar files.
I found the solution. I was using log4j-core-2.8.2.jar and log4j-1.2-api-2.8.2.jar instead of log4j-api-2.3.jar and log4j-core-2.3.jar.
For whatever reason the 2.3 version works and the 2.8.2 version doesn't. When I changed the jar files the program compiled and ran under both Win 10 and Ubuntu without error.
I am very annoyed about this. I am learning Java and I like the language but I have spent far more time troubleshooting issues than writing code. The demo programm compiled OK and only threw up errors when run. The experienced programmers that make Stackoverflow such a great resource didn't spot the problem, and why should they. The cryptic error messages gave no hint to the root cause of the problem. It shouldn't be this difficult. It is very frustrating.
I tried to download Java on my laptop (which has windows 10) but i keep getting a 1603 error. My computer used to have windows 8.1 and it did not work back then either
I appreciate any advice to solve or work around this problem
I have had this problem. I was able to fix it thanks to a co-worker. The problem started happening after I installed HP Unified Functional Testing (UFT, aka QTP). Installing this product changes the Windows environment variables used by Java. He told me the following: "So change the names of JAVA_OPTIONS, IBM_JAVA_OPTIONS, JAVA_TOOL_OPTIONS to something else (both in system and user variables) and delete any Java folder(in Program Files (x86) or Program Files) which gets installed despite the error. Restart the system and then try installing Java."
Actually, all I did was rename the environment variables and run the installer. This worked.
My answer is not related to win 10, but might help someone who is having similar problem in windows 7 machine and not able to install jre 32 bit version.
the work around to this is once you downloaded the jre, copy the path "C:\Program Files (x86)\Java\jre1.8.0_121\bin\javaw.exe" and paste it under java runtime environment settings which is found -Java Control panel>java>view
I think you downloaded the wrong version. If your laptop support x64 bit software you should download Java 1.8 x64 version.
Here is the link.
https://www.java.com/en/download/manual.jsp
I had this problem for a month now. I tried everything on my windows 8, but I couldn't get the latest java on it. When I tried to install java on an empty computer, the 64 bit version did not go through (error 1603) and I realized the problem didn't come from an old java install and I install 32 bit. it worked on the new computer with windows 7 and on my computer running 8.1.
note: I had deleted all the java versions before going through with it.
To fix java 1603 error you have to follow few simple steps.
First of all remove all old java version.
Then remove some windows update file which might be reason of this
error. Like KB2918614 update.
After that download and Install latest version of java and activate
java in browser. Now everything will be fine you can test the java
version on java website...
For explained and easy solution to java 1603 error follow this link: http://protechguides.com/java-error-code-1603-solved/
I encountered this error on Windows 8.1 and when I checked with Oracle web site, they said that is is not yet resolved, and under investigation. They also showed a link for off-line installation as an alternative arrangement. However, upon investigation of my system, i found out that the available space in C drive was only about 20 MB or so. I cleared my system and provided enough space. When I tried with the extra space, I didn't encounter any error. May be, you could try with a better free space...
First you should close the browser because if any webpage will use Java, it will cause conflict. Then do custom installation, i.e. install in some other folder other than default folder and point environment variable to newly installed Java location. It will resolve your issue.
I just installed Android Studio on Elementary OS 0.3 Freya and run it using the terminal. On my first start-up, however, there's an error message shown:
Gradle 'Test' project refresh failed
Unable to start the daemon process. This problem might be caused by
incorrect configuration of the daemon. For example, an unrecognized
jvm option is used. Please refer to the user guide chapter on the
daemon at http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
Unrecognized VM option 'MaxPermSize=256m' Error: Could not create the
Java Virtual Machine. Error: A fatal exception has occurred. Program
will exit.
I read this and tried all the ways to solve it but to no avail. I did notice that his error was somewhat different from mine and thought that might be why I couldn't solve my problem using the ways suggested.
As I executed the .sh file on my terminal, it printed:
Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=250m;
support was removed in 8.0
(java:5094): Gtk-WARNING **: Unable to locate theme engine in
module_path: "pixmap"
Gtk-Message: Failed to load module "canberra-gtk-module"
I'm not sure whether it's related to the error or not. Please help.
In my case I had a line
org.gradle.jvmargs=-Xmx6408m -XX:MaxPermSize=6408m -XX:+HeapDumpOnOutOfMemoryError
in my gradle.properties file in the project structure.
removing -XX:MaxPermSize=6408m from that file fixed an issue
As it was already said in this thread, Permanent Generation was removed in Java 8, which is used in your case. I think, the easiest solution is to remove parameters associated with Permanent Generation during program execution.
Go to the directory where you have Android Studio. Then go to the bin/ subdirectory. Locate the following files, which contains Java Virtual Machine options:
studio.vmoptions
studio64.vmoptions
Open these files and locate line with MaxPerSize parameter. It should look as follows:
XX:MaxPermSize=256m
Remove this line in both files. I don't know if you are using 32-bit or 64-bit operating system, so you can update both files just in case.
I'm not sure if it will solve your problem, but I would try it in such situation. In my case, with this option and Java 8, I just get the warning, but Android Studio starts anyway. After removing this parameter, Android Studio still starts, but without warning. I'm using Ubuntu 14.04 LTS.
EDIT:
There is another solution for this problem described here: https://stackoverflow.com/a/27913562/1150795.
Go to File > Other Settings > Default Project Structure > JDK location and check the path.
In case of Ubuntu Linux, we can set /usr/lib/jvm/java-7-oracle as default JDK if we are using Oracle JVM. JDK 7 is the safest option for Android.
-XX:MaxPermSize was deprecated in JDK 8, marked as obsolete in JDK 16, and removed in JDK 17. It was superseded by the -XX:MaxMetaspaceSize option.
Change -XX:MaxPermSize to -XX:MaxMetaspaceSize solve my problem.
ref:
https://github.com/expo/expo-cli/issues/4196#issuecomment-1035850918
https://docs.oracle.com/en/java/javase/17/docs/specs/man/java.html#removed-java-options
In my case opening $ANDROID_HOME/tools/lib/monitor-x86_64/monitor.ini and removing
XX:MaxPermSize=256m
from it did the job.
Oh I've solved this problem, I install Oracle JDK 9 when android studio runs on JDK 6 or JDK 7 (if I'm not mistaken).
so I uninstalled Oracle JDK 9, then download and install the JDK 7.
On MacOS the following clause in ./gradlew injects this option:
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\" \"-Xmx1024m\" \"-Xms256m\" \"-XX:MaxPermSize=1024m\""
fi
This file can be edited by hand after the project has been generated.
i had the same issue and i was able to solve it by adding this directly in the terminal
export JAVA_VERSION=1.8
and then try the
All - I just downloaded the latest grails (2.1.0) and JDK (1.7.0_07) on my Win7 64bit machine and configured my machine as follows:
1.) Added environment variables for Java and Grails
2.) Update PATH as appropriate
3.) Verified that everything installed correctly by executing java -version and grails -version
The java -version command works, and shows the following:
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)
but the grails -version command yields the following error:
Exception: java.lang.RuntimeException thrown from the UncaughtExceptionHandler in thread “main”
I tried debugging by completely uninstalling all Java, then reinstalling, but the same error occurs. I verified that I installed the 64 bit version of Java.
More information about the error can be found at this website (Mike [the owner] directed me to Stackoverflow for more help).
Any idea is to why this occurred? What can I do to get Grails working? Thanks in advance for your help.
-Tom
Edit 1 from Vector's comment:
All variables are set properly and shown here:
GRAILS_HOME = C:\grails\grails-2.1.0
JAVA_HOME = C:\Program Files\Java\jdk1.7.0_07
Path = [lots of other stuff];%JAVA_HOME%\bin;%GRAILS_HOME%\bin;
Edit 2 Fixed java version number at top of problem statement (version is 1.7.0_07) per #crudolf
Answer: Thou shalt ensurest that thine box is set to Administrator . . . and the people rejoiced.
Apparently, Grails wants to write to C:\Users\Administrator.grails and C:\Users\Administrator.groovy. Even though I had admin rights on my machine (since I successfully installed Java), I apparently needed to click through into the Administrator folder in order for the preferences to be written that I wanted to use JDK.
All is well. Thanks everyone for your help.
I ran into this error after attempting to upgrade from Grails 2.1.0 to Grails 2.2.1 on Windows 7.
I simply had to delete the C:\User\%USERNAME%\.grails and C:\User\%USERNAME%\.groovy folders created by and leftover from Grails 2.1.0.
It appeared that Grails was loading some leftover cached JARs or configuration files of .grails and .groovy instead of %GRAILS_HOME%.
It took hours, but I learned my lesson - delete ".grails" and ".groovy" before running a new version of Grails!
I ran into this problem with Grails 2.4.0 and 2.2.4 on Windows 8.1 Pro. I noticed that the problem did not occur if I ran the grails command in an administrator cmd-shell. I then checked my Appdata\Local\Temp. It turned out that the security setting for the temp folder needed to be changed. After I gave Everyone the full access to Appdata\Local\Temp folder, the problem was solved. But you may need to check the security setting often because some Windows Apps reset the security setting.
I was having the same problem. I was having a working grails-2.2.4 with java-1.7.25 on a Windows 7 x86. But it suddenly stopped working today. I tried removing ~/.groovy and ~/.grails, but still got java.lang.RuntimeException thrown from the UncaughtExceptionHandler.
Finally, the problem was solved by removing ~/.m2 as well.
BTW, "set DEBUG=1" before starting "grails" in a Command Prompt will show the environment and parameters to launch Java.exe.
I was having a similar problem but in Ubuntu 12.04. I solved it by removing $GROOVY_HOME environment variable. If you also have $GROOVY_HOME variable try removing it.
Try deleting the file .grails_history file located in your %Home% directory.
This worked for me on Windows 8.1
I am using Windows 7 and have recently installed Eclipse Helios(64bit).
I was controlling a local installation of Tomcat7 from my Eclipse install, and Eclipse and tomcat were starting correctly. However, I was getting some errors with the M2Eclipse plugin and realise the JDK I was using was not 64bit, so updated my JDK to the 64 bit.
Unfortunately, since updating the JDK to 64bit my tomcat will no longer start, and instead I get the following error in my stack trace:
02-May-2011 21:02:38 org.apache.catalina.startup.Bootstrap initClassLoaders
SEVERE: Class loader creation threw exception
java.lang.NoSuchFieldError: threadAllocatedMemorySupport
at sun.management.VMManagementImpl.initOptionalSupportFields(Native Method)
at sun.management.VMManagementImpl.<clinit>(VMManagementImpl.java:47)
at sun.management.ManagementFactory.<clinit>(ManagementFactory.java:468)
at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504)
at org.apache.catalina.startup.Bootstrap.createClassLoader(Bootstrap.java:184)
at org.apache.catalina.startup.Bootstrap.initClassLoaders(Bootstrap.java:97)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:208)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:406)
Has any one else come across this or know what the issue might be?
---------------EDIT------------------------
Furthemore, I have started the local tomcat using startup.bat and it started fine, but then when trying to access the manager I get a java.lang.outOfMemoryError permgen Space error (whihc i wasnt getting before- was all running ok before the jdk upgrade)
Ok, I have found the problem
The guys above were on the right lines in terms of investigating the JDK version being used was correct.
What had happened was, although I had updated Eclipse prefs to use the 64bitJDK, the JRE system libraries were still pointing to the old JDK - I have never come across this before, and pretty sure that when I have updated the JDK before it has automatically refreshed the JRE library list as well. I then removed all the JRE system libraries from the list and refreshed and it then re-populated with the libraries from the 64bit jdk
Maybe the wrong tcnative is installed? Get rid of it from bin directory and see what happens