Java Web Start 6 fails to launch an application because of Web Start cache corruption.
The problem is not strictly reproducible, but not too difficult to reproduce.
This was observed on Windows XP SP2 (single CPU: Pentium IV, 1.8 GHz).
The problem was reproduced using Java Web Start 6 on JRE 1.6.0
or using Java Web Start 6 on JRE 1.4.2,
but never using Java Web Start 1.4.2 on JRE 1.4.2.
Suppose a connection of regular LAN speed (100 Mbps).
Start a Web Start Application.
I used columba (16 jar files):
http://columba.sourceforge.net/webstart/columba.jnlp
and did work through the following steps:
0. download the jnlp file "columba.jnlp"
1. clear cache regarding this application: use "Resources" choice
2. launch the application by "javaws columba.jnlp"
3. interrupt the download by pressing the "cancel" button while the
modal box is in "downloading application"
4. iterate between step 2 and step 3 about 5 times.
5. then let the application continue to load entirely
6. answer the two more modal boxes by pressing the "Run" button
7. answer the "Choose profile ...." dialog with "OK"
8. if you are lucky the application will fail here and give
"Application Error: Unable to launch the application"
9. The "Details" button may give the following information:
Console tab:
------------
Java Web Start 1.6.0_03
Using JRE version 1.6.0_03 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Administrator
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
0-5: set trace level to <n>
----------------------------------------------------
java.lang.NoClassDefFoundError: org/waffel/jscf/JSCFException
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at org.columba.mail.main.MailMain.init(MailMain.java:85)
at org.columba.core.component.ComponentManager.init(ComponentManager.java:75)
at org.columba.core.main.Main.run(Main.java:288)
at org.columba.core.main.Main.main(Main.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
#### Java Web Start Error:
#### null
Exception tab:
--------------
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: org/waffel/jscf/JSCFException
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at org.columba.mail.main.MailMain.init(MailMain.java:85)
at org.columba.core.component.ComponentManager.init(ComponentManager.java:75)
at org.columba.core.main.Main.run(Main.java:288)
at org.columba.core.main.Main.main(Main.java:97)
... 9 more
In this case it helped to remove the "javaw.exe" from the tasklist and remove
the resource "jscf-0.3.jar" (22kB) from the Web Start cache.
The jar file "jscf-0.3.jar" is normally 27kB.
Here is another incident of the same problem:
Console tab:
------------
Java Web Start 1.6.0_03
Using JRE version 1.6.0_03 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Administrator
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
0-5: set trace level to <n>
----------------------------------------------------
java.lang.UnsatisfiedLinkError: no tray in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at org.jdesktop.jdic.tray.internal.impl.DisplayThread.<clinit>(Unknown Source)
at org.jdesktop.jdic.tray.internal.impl.WinSystemTrayService.<clinit>(Unknown Source)
at org.jdesktop.jdic.tray.internal.impl.ServiceManagerStub.getService(Unknown Source)
at org.jdesktop.jdic.tray.internal.ServiceManager.getService(Unknown Source)
at org.jdesktop.jdic.tray.SystemTray.<clinit>(Unknown Source)
at org.columba.core.gui.trayicon.JDICTrayIcon.<init>(JDICTrayIcon.java:32)
at org.columba.core.main.Main.initPlatformServices(Main.java:197)
at org.columba.core.main.Main.run(Main.java:297)
at org.columba.core.main.Main.main(Main.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
#### Java Web Start Error:
#### null
Exception tab:
--------------
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: no tray in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at org.jdesktop.jdic.tray.internal.impl.DisplayThread.<clinit>(Unknown Source)
at org.jdesktop.jdic.tray.internal.impl.WinSystemTrayService.<clinit>(Unknown Source)
at org.jdesktop.jdic.tray.internal.impl.ServiceManagerStub.getService(Unknown Source)
at org.jdesktop.jdic.tray.internal.ServiceManager.getService(Unknown Source)
at org.jdesktop.jdic.tray.SystemTray.<clinit>(Unknown Source)
at org.columba.core.gui.trayicon.JDICTrayIcon.<init>(JDICTrayIcon.java:32)
at org.columba.core.main.Main.initPlatformServices(Main.java:197)
at org.columba.core.main.Main.run(Main.java:297)
at org.columba.core.main.Main.main(Main.java:97)
... 9 more
10. After the application has failed to start, close the application error dialog
by pression "OK". The application appears to have terminated.
11. Restart it once more by running "javaws columba.jnlp"
12. The application quickly reaches the "Choose profile ...." dialog.
13. Press "OK" and the application will suddenly close *all* its windows this time.
At this point in time the user may be completely stuck.
14. At this point the task list shows two "javaw.exe" processes.
These need to be terminated.
15. Furthermore the Web Start cache needs to be cleared from the resources of the
application. Otherwise the user may be completely stuck.
Here is another incident of the problem:
Console tab:
------------
Java Web Start 1.6.0_03
Using JRE version 1.4.2_15 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Administrator
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
0-5: set trace level to <n>
----------------------------------------------------
#### Java Web Start Error:
#### org.columba.core.main.Main
Exception tab:
--------------
java.lang.ClassNotFoundException: org.columba.core.main.Main
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)