Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6648381
Votes 0
Synopsis FontConfiguration exception preventing applets from loading
Category java_plugin:plugin
Reported Against b13
Release Fixed 6u10(b11), 6u6(b02) (Bug ID:2160244)
State 11-Closed, Unverified, bug
Priority: 2-High
Related Bugs 6672382
Submit Date 08-JAN-2008
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  xxxxx .reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at  xxxxx .reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at  xxxxx .reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at  xxxxx .plugin2.main.client.PluginMain.createEmbeddedFrame(Unknown Source)
        at  xxxxx .plugin2.main.client.PluginMain.access$100(Unknown Source)
        at  xxxxx .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  xxxxx .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  xxxxx .awt.FontConfiguration$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at  xxxxx .awt.FontConfiguration.getFontCharsetEncoder(Unknown Source)
        at  xxxxx .awt.FontConfiguration.buildFontDescriptors(Unknown Source)
        at  xxxxx .awt.FontConfiguration.getFontDescriptors(Unknown Source)
        at  xxxxx .awt.FontConfiguration.getFontDescriptors(Unknown Source)
        at  xxxxx .awt.PlatformFont.<init>(Unknown Source)
        at  xxxxx .awt.windows.WFontPeer.<init>(Unknown Source)
        at  xxxxx .awt.windows.WToolkit.getFontPeer(Unknown Source)
        at java.awt.Font.getPeer_NoClientCode(Unknown Source)
        at java.awt.Font.getPeer(Unknown Source)
        at  xxxxx .awt.windows.WComponentPeer._setFont(Native Method)
        at  xxxxx .awt.windows.WComponentPeer.setFont(Unknown Source)
        at  xxxxx .awt.windows.WWindowPeer.initialize(Unknown Source)
        at  xxxxx .awt.windows.WFramePeer.initialize(Unknown Source)
        at  xxxxx .awt.windows.WComponentPeer.<init>(Unknown Source)
        at  xxxxx .awt.windows.WCanvasPeer.<init>(Unknown Source)
        at  xxxxx .awt.windows.WPanelPeer.<init>(Unknown Source)
        at  xxxxx .awt.windows.WWindowPeer.<init>(Unknown Source)
        at  xxxxx .awt.windows.WFramePeer.<init>(Unknown Source)
        at  xxxxx .awt.windows.WEmbeddedFramePeer.<init>(Unknown Source)
        at  xxxxx .awt.windows.WToolkit.createEmbeddedFrame(Unknown Source)
        at  xxxxx .awt.windows.WEmbeddedFrame.addNotify(Unknown Source)
        at  xxxxx .awt.windows.WEmbeddedFrame.<init>(Unknown Source)
        at  xxxxx .plugin2.main.client.WPluginEmbeddedFrame.<init>(Unknown Source)
        ... 15 more

It is clear that the reason for this is that the  xxxxx .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.
Posted Date : 2008-01-08 23:13:23.0
Work Around
N/A
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.
Posted Date : 2008-01-09 02:04:18.0
Comments
  
  Include a link with my name & email   

Submitted On 20-MAR-2008
Deego
try



PLEASE NOTE: JDK6 is formerly known as Project Mustang