Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4171169

Serialization engine throws erroneous InvalidClassException in 1.2 FCS H

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.2.0
    • core-libs

      To reproduce this bug, first launch the AWT Conformance test using the latest
      promotion of JDK 1.1.7 (currently K). The 1.1 version of this test can be found
      at /net/oakum.eng/export/disk0/green1/SCCS_DIRECTORIES/JDK-brutus.AWT/test/java/
      awt/CONFORMANCE.
        
      From the "Test" menu, select "Persistent serialization --> Save serialized
      state...". Specify a filename, click OK, and then exit the test.

      Now, load in the 1.2 version of the AWT Conformance test using the FCS H build.
      This version of the test can be found at
        <1.2 ws>/test/java/awt/CONFORMANCE.

      From the "Test" menu, select "Persistent serialization --> Load serialized
      state...". Specify the same filename and click OK.
      The following exception appears:

      java.io.InvalidClassException: [Ljava.awt.Component;; Serializable is incompatible with Externalizable
              at java.io.ObjectStreamClass.validateLocalClass(ObjectStreamClass.java:458)
              at java.io.ObjectStreamClass.setClass(ObjectStreamClass.java:482)
              at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:776)
              at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
              at java.io.ObjectInputStream.readObject(ObjectInputStream.java:227)
              at java.io.ObjectInputStream.inputArray(ObjectInputStream.java:793)
              at java.io.ObjectInputStream.readObject(ObjectInputStream.java:352)
              at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:1822)
              at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:497)
              at java.awt.Container.readObject(Container.java:1497)
              at java.lang.reflect.Method.invoke(Native Method)
              at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:1676)
              at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1156)
              at java.io.ObjectInputStream.readObject(ObjectInputStream.java:364)
              at java.io.ObjectInputStream.readObject(ObjectInputStream.java:227)
              at AWTConformanceTest.loadSerializedFile(AWTConformanceTest.java:424)
              at AWTConformanceTest.loadSerialize(AWTConformanceTest.java:439)
              at AWTConformanceTest.actionPerformed(AWTConformanceTest.java:371)
              at AWTConformanceTest.actionPerformed(AWTConformanceTest.java:337)
              at java.awt.MenuItem.processActionEvent(MenuItem.java:453)
              at java.awt.MenuItem.processEvent(MenuItem.java:417)
              at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:236)
              at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:226)
              at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:238)
              at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:226)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:260)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:68)
      Serialization error -- please file a bug report

      The Exception does not appear when running with the "G" build. Note that
      Component and Container are both declared Serializable, but not Externalizable,
      in 1.1 and 1.2.

            jfialli Joe Fialli
            dmendenhsunw David Mendenhall (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: