JDK-6631587 : JKernel ClassCircularityError on some locales
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 6u10
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: generic,x86
  • Submitted: 2007-11-19
  • Updated: 2010-09-08
  • Resolved: 2008-01-31
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.
6u10 b09Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Java Kernel experiences a ClassCircularityError when attempting to download bundles in any locale that requires a character converter not present in the core (pretty much anything besides US).
Turns out this is causing browser crashes as well.  Upgrading to P1.

EVALUATION Ended up being more complicated than this. The first access to the charset class is from System.initializeSystemClass, while setting up the err and out streams. If the charset needs to be downloaded, it will happen here. Unfortunately System isn't initialized yet and the JRE isn't working enough for Kernel to perform the download, so we have a Catch-22. The simplest fix turned out to be moving the loadLibrary("zip") up a few lines so it was working by the time Kernel needed it, and ensure that Kernel doesn't freak out if System.out or System.err was null. I then disabled the safety checks that prevented Kernel from being invoked this early in the JRE startup process. The charsets bundle can now be downloaded when required.

EVALUATION Kernel is using FileReader and FileWriter to work with text files in a couple of spots. Normally this is a sound practice, but it creates a dependency on arbitrary character converters... which are generally not present in the core. This manifests as a ClassCircularityError, as downloading a bundle causes us to try to load the character converter, which causes us to try downloading the bundle containing it, which causes... Since the files in question are all plain ASCII, we should be fine to use FileInputStream / FileOutputStream instead of FileReader / FileWriter.