Why am I getting Exception in thread "main" java.lang.NoClassDefFoundError when Running JBE in JSL debug mode?
I am trying to configure JBE as a Windows Service using Java Service Launcher [0.99.o] on a Windows 7 system. I have followed the steps outlined here:
https://jazz.net/wiki/bin/view/Main/JbeAsAWindowsService JAVA_HOME is set to the location of the JDK that ships with the 32bit RTC client that is installed on the system [v5.0.2]. C:\Program Files (x86)\IBM\TeamConcert\jdk I can run JBE via java.exe rather than jbe.exe and the build engine processes requests successfully. I edited the jsl.ini file in the bin directory (not the one in the parent) and commented out the sections as indicated. I ran jsl.exe -debug to test this configuration. The console output on first run in debug mode told me that the jvmtype (which was set to "server") could not be found. I found that changing this property to classic or j9vm gets around this. The next attempt at running JSL in debug mode threw up another error. This time I see "ControlHandler registered after JVM start" followed by the following exception and the service stops. I am not sure why this happens or how I can resolve this. Any help would be appreciated: ControlHandler registered after JVM start :1451925100: java starting 4.4 :52991532652: java starting 5 Exception in thread "main" java.lang.NoClassDefFoundError: java Caused by: java.lang.ClassNotFoundException: java at java.net.URLClassLoader.findClass(URLClassLoader.java:665) at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:760) at java.lang.ClassLoader.loadClass(ClassLoader.java:728) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) at java.lang.ClassLoader.loadClass(ClassLoader.java:707) :52991532652: java starting 10 :52991532652: java starting 12 Main Thread has exited. Now making DestroyJavaVM() call. DestroyJavaVM() will bl ock so the JVM will keep running until all daemon threads have terminated. :31855155411066476: Exit hook called Exit code 0 :31855155411066476: Cleanup complete :31855155411066476: Service stop status set. |
One answer
As I recall, the path and other environment variables are not used by services. (for security purposes)..
that is why the ini file is critical. so I think the claspath in the ini file is wrong Comments
Des Nunan
commented Jan 04 '16, 1:40 p.m.
Thanks for your response.
sam detweiler
commented Jan 04 '16, 1:51 p.m.
You might also want to try the pathname without the spaces..
Des Nunan
commented Jan 06 '16, 9:13 a.m.
Tried using path shortname to no avail. I also tried using a JDK installed to a different location (C:\Java), changed the ini to point jrepath to that location instead but this did not work for me either. I am still getting the same error.
Des Nunan
commented Jan 06 '16, 12:29 p.m.
I got JSL running in debug mode. It was my mistake.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.