JDK-6648381 : FontConfiguration exception preventing applets from loading
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6,6u5,6u10
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,windows_xp
  • CPU: generic,x86
  • Submitted: 2008-01-08
  • Updated: 2010-09-17
  • 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.
JDK 6 JDK 7
6u10 b11Fixed 7Fixed
Related Reports
Duplicate :  
Description
A recent run of the applet compatibility test suite with the new Java Plug-In turned up the following exception for many of the applets:

java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at sun.plugin2.main.client.PluginMain.createEmbeddedFrame(Unknown Source)
        at sun.plugin2.main.client.PluginMain.access$100(Unknown Source)
        at sun.plugin2.main.client.PluginMain$1.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file default
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at sun.plugin2.applet.Applet2ClassLoader.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 java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at sun.awt.FontConfiguration$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.awt.FontConfiguration.getFontCharsetEncoder(Unknown Source)
        at sun.awt.FontConfiguration.buildFontDescriptors(Unknown Source)
        at sun.awt.FontConfiguration.getFontDescriptors(Unknown Source)
        at sun.awt.FontConfiguration.getFontDescriptors(Unknown Source)
        at sun.awt.PlatformFont.<init>(Unknown Source)
        at sun.awt.windows.WFontPeer.<init>(Unknown Source)
        at sun.awt.windows.WToolkit.getFontPeer(Unknown Source)
        at java.awt.Font.getPeer_NoClientCode(Unknown Source)
        at java.awt.Font.getPeer(Unknown Source)
        at sun.awt.windows.WComponentPeer._setFont(Native Method)
        at sun.awt.windows.WComponentPeer.setFont(Unknown Source)
        at sun.awt.windows.WWindowPeer.initialize(Unknown Source)
        at sun.awt.windows.WFramePeer.initialize(Unknown Source)
        at sun.awt.windows.WComponentPeer.<init>(Unknown Source)
        at sun.awt.windows.WCanvasPeer.<init>(Unknown Source)
        at sun.awt.windows.WPanelPeer.<init>(Unknown Source)
        at sun.awt.windows.WWindowPeer.<init>(Unknown Source)
        at sun.awt.windows.WFramePeer.<init>(Unknown Source)
        at sun.awt.windows.WEmbeddedFramePeer.<init>(Unknown Source)
        at sun.awt.windows.WToolkit.createEmbeddedFrame(Unknown Source)
        at sun.awt.windows.WEmbeddedFrame.addNotify(Unknown Source)
        at sun.awt.windows.WEmbeddedFrame.<init>(Unknown Source)
        at sun.plugin2.main.client.WPluginEmbeddedFrame.<init>(Unknown Source)
        ... 15 more

It is clear that the reason for this is that the sun.awt.FontConfiguration class is attempting to load a class called "default" and expecting to receive a ClassNotFoundException rather than a ClassFormatError. We don't know exactly what regional settings are causing this failure so we can not reproduce it in house. However the change to the code to avoid this exception is very small and straightforward.

Comments
SUGGESTED FIX http://sa.sfbay.sun.com/projects/deployment_data/6u10/6648381.0
09-01-2008

EVALUATION The first run of the applet compatibility test suite against the new Java Plug-In contained several failures caused by the AWT Font code trying to fetch an invalid class ("default.class") from the codebase on the web server. This is a general problem that has been seen before in other contexts, but this one is more severe because it prevents the applet from running altogether. It isn't yet fully understood what locale settings (if that) on the machine need to be set to provoke the failure, but the workaround is clear. We will attempt to get information to produce a regression test for this bug after it is integrated.
09-01-2008