JDK-6569136 : ClassNotFoundException while loading classes from rt.jar
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 6u4
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: x86
  • Submitted: 2007-06-13
  • Updated: 2010-09-08
  • Resolved: 2007-08-03
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.
6u4 b01Fixed
I am getting the following ClassNotFoundException while loading all the classes in rt.jar using Kernel JRE.  (rt.jar used is from 1.6.0 release )

CNFE: "sun.misc.resources.Messages"
CNFE: "sun.misc.resources.Messages_de"
CNFE: "sun.misc.resources.Messages_es"
CNFE: "sun.misc.resources.Messages_fr"
CNFE: "sun.misc.resources.Messages_it"
CNFE: "sun.misc.resources.Messages_ja"
CNFE: "sun.misc.resources.Messages_ko"
CNFE: "sun.misc.resources.Messages_sv"
CNFE: "sun.misc.resources.Messages_zh_CN"
CNFE: "sun.misc.resources.Messages_zh_HK"
CNFE: "sun.misc.resources.Messages_zh_TW"
Installing Optional Packages failing with Kernel JRE.

How to reproduce:
Try loading the following URL

Exception shown:
java.lang.NoClassDefFoundError: Could not initialize class sun.misc.ExtensionInfo
   at sun.misc.ExtensionDependency.checkExtensionAgainst(Unknown Source)
   at sun.misc.ExtensionDependency.checkExtensionAgainstInstalled(Unknown Source)
   at sun.misc.ExtensionDependency.checkExtension(Unknown Source)
   at sun.misc.ExtensionDependency.checkExtensions(Unknown Source)
   at sun.misc.ExtensionDependency.checkExtensionsDependencies(Unknown Source)
   at sun.misc.URLClassPath$JarLoader.parseExtensionsDependencies(Unknown Source)
   at sun.misc.URLClassPath$JarLoader.getClassPath(Unknown Source)
   at sun.misc.URLClassPath.getLoader(Unknown Source)
   at sun.misc.URLClassPath.getResource(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 sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:155)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:127)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:618)
   at sun.applet.AppletPanel.createApplet(AppletPanel.java:778)
   at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2070)
   at sun.applet.AppletPanel.runLoader(AppletPanel.java:707)
   at sun.applet.AppletPanel.run(AppletPanel.java:361)
   at java.lang.Thread.run(Unknown Source)

EVALUATION The sun.misc.* classes are filtered out in DownloadManager, due to the fact that they are all included and it causes problems for DownloadManager to be asked about its sun.misc dependencies while it's still in the middle of initializing. The resources subpackage was unfortunately being hit by the same filter, despite not being part of the core -- so none of them could ever be loaded. I changed the sun/misc/* rule to sun/misc/..., so these classes are likewise part of the core.