JDK-8019167 : ClassFinder.findClass cannot find class in linked jar when running from webstart
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 7u25
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • OS: windows_7
  • Submitted: 2013-06-26
  • Updated: 2013-07-26
  • Resolved: 2013-07-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7u40Resolved
Related Reports
Duplicate :  
Relates :  
Description
FULL PRODUCT VERSION :
java version  " 1.7.0_25 " 
Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]

A DESCRIPTION OF THE PROBLEM :
If the application is run from java webstart, ClassFinder.findClass on the EventQueue thread can not find classes in jars linked in the JNLP file. This is causing a crash in XMLDecoder.readObject because parsing xml containing a class from a linked jar file fails.

Note: calls to ClassFinder.findClass work fine on the main thread, but not on the EventQueue thread.

This appears to be related to the fact that Thread.currentThread().getContextClassLoader() in the EventQueue thread has changed behavior in 7u25.

In 7u21, this returned a loader of type com.sun.jnlp.JNLPClassLoader, which can load the required class.
In 7u25, this returns a loader of type sun.misc.Launcher$AppClassLoader, which cannot load the required class.


REPRODUCIBILITY :
This bug can be reproduced always.
Comments
remove the critical-watch if this is closed as a dup.
24-07-2013

Will be fixed by changes for JDK-8017776. Closing as duplicate.
08-07-2013

we need to make sure that the patch for 8017776 will fix this test case.
05-07-2013