JDK-4968739 : 1.4 compiled class gives ClassFormatError with 1.5 runtime
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 5.0
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_9,windows_2000
  • CPU: generic,x86
  • Submitted: 2003-12-15
  • Updated: 2004-03-20
  • Resolved: 2004-01-17
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.
Other
5.0 b36Fixed
Related Reports
Relates :  
Description
While running the customer application which is compiled with 1.4.1
compiler with j2se 1.5 (build 30), following error was seen and
the application component failed to launch:

Current thread: AWT-EventQueue-0
java.lang.ClassFormatError: Duplicate entry in InnerClasses in
class file
com/sybase/asa/QueryEditor/JoinPage
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:601)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
        at
java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at
java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native
Method)
        at
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:279)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:151)
        at sybase.isql.ISQLPanel.editQuery(ISQLPanel.java:2285)
        at sybase.isql.ISQLPanel.processMenu(ISQLPanel.java:2149)
        at
sybase.isql.ParentFrame.processMenu(ParentFrame.java:842)
        at
sybase.isql.ParentFrame$ISQLAction.actionPerformed(ParentFrame.java:2004)
        at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1834)
        at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2152)

        at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)

        at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
        at
javax.swing.AbstractButton.doClick(AbstractButton.java:302)
        at
com.sun.java.swing.plaf.motif.MotifMenuItemUI$MouseInputHandler.mouseReleased(MotifMenuItemUI.java:84)

        at
java.awt.Component.processMouseEvent(Component.java:5463)
        at
javax.swing.JComponent.processMouseEvent(JComponent.java:3052)
        at java.awt.Component.processEvent(Component.java:5228)
        at java.awt.Container.processEvent(Container.java:1961)
        at
java.awt.Component.dispatchEventImpl(Component.java:3931)
        at
java.awt.Container.dispatchEventImpl(Container.java:2019)
        at java.awt.Component.dispatchEvent(Component.java:3779)
        at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4203)
        at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3883)
        at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:3813)
        at
java.awt.Container.dispatchEventImpl(Container.java:2005)
        at java.awt.Window.dispatchEventImpl(Window.java:1739)
        at java.awt.Component.dispatchEvent(Component.java:3779)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
        at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:231)

        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)

        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
        at
java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

---------------------
Verified with Tiger-beta2 b43 on win2000 Pro.

###@###.### 2004-03-19

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta FIXED IN: tiger-beta tiger-beta2 INTEGRATED IN: tiger-b36 tiger-beta tiger-beta2 VERIFIED IN: tiger-beta2
14-06-2004

EVALUATION The 1.5 runtime must accept class files produced by previous versions of javac if those class files were accepted by previous VMs. ###@###.### 2003-12-19 Apparently, these class files were generated by a custom compiler, not javac. They were not "compiled with 1.4.1". I'm not sure we should be so careful to maintain backward compatibility in our handling of class files that violate the JVM spec. In fact, it is a bug in previous VMs that these class files were not rejected. However, for backward compatibility they should probably be accepted. For higher class file versions, however, we can add this constraint. ###@###.### 2004-01-07 To maintain backward compatibility, the VM will be changed to accept duplicate inner class entries in classes with major versions less than 49. ###@###.### 2004-01-14
07-01-2004