United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6642654 Java Web Start 1.6.0 shows "Unable to launch the application" because of cache corruption
JDK-6642654 : Java Web Start 1.6.0 shows "Unable to launch the application" because of cache corruption

Details
Type:
Bug
Submit Date:
2007-12-17
Status:
Closed
Updated Date:
2010-11-04
Project Name:
JDK
Resolved Date:
2008-02-19
Component:
deploy
OS:
windows_xp
Sub-Component:
webstart
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
6,6u6
Fixed Versions:
6u10 (b12)

Related Reports
Backport:
Duplicate:

Sub Tasks

Description
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)

                                    

Comments
WORK AROUND

No workaround known. 
The problem needs to be cured by 
 - terminating all "javaw.exe" processes
 - clearing out all concerned resources from the Web Start cache
                                     
2007-12-17
EVALUATION

with 6u10 b11, i can reproduce one of the exception reported, and the application did fail to launch:

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)

looks like the cache index file manifest entry is corrupted for some reason:

java.io.EOFException
   at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
   at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
   at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
   at java.io.ObjectInputStream.<init>(Unknown Source)
   at com.sun.deploy.cache.CacheEntry.readManifest(Unknown Source)
   at com.sun.deploy.cache.CacheEntry.readManifest(Unknown Source)
   at com.sun.deploy.cache.CacheEntry.getCertificateMap(Unknown Source)
   at com.sun.javaws.security.SigningInfo.verifyAllEntriesSigned(Unknown Source)
   at com.sun.javaws.security.SigningInfo.checkSigning(Unknown Source)
   at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(Unknown Source)
   at com.sun.javaws.LaunchDownload.checkSignedResources(Unknown Source)
   at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
   at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
   at com.sun.javaws.Launcher.launch(Unknown Source)
   at com.sun.javaws.Main.launchApp(Unknown Source)
   at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
   at com.sun.javaws.Main$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

More investigation is needed.
                                     
2008-01-30
SUGGESTED FIX

After we located the cached jar entry that we need, we verify it's manifest in the index file is not corrupted before using the entry.

http://sa.sfbay.sun.com/projects/deployment_data/6u10/6642654.0
                                     
2008-02-01



Hardware and Software, Engineered to Work Together