United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6631587 JKernel ClassCircularityError on some locales
6631587 : JKernel ClassCircularityError on some locales

Details
Type:
Bug
Submit Date:
2007-11-19
Status:
Closed
Updated Date:
2010-09-08
Project Name:
JDK
Resolved Date:
2008-01-31
Component:
deploy
OS:
windows_xp
Sub-Component:
deployment_toolkit
CPU:
x86,generic
Priority:
P1
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
6u10

Related Reports
Duplicate:
Duplicate:
Relates:

Sub Tasks

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

                                    

Comments
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.
                                     
2007-11-27
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.
                                     
2007-11-19



Hardware and Software, Engineered to Work Together