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

JInternalFrame not serializable in Motif & GTK L&F

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b43
    • CPU:
      generic
    • OS:
      generic

      Description

      JInternalFrame is not serializable in Motif & GTK L&F while it can be serialize
      using other L&F's
      Steps to reproduce:
      1) Run the attached test TestSerializeInternalFrame
      2) Change L&F to Motif or GTK using Menu "Look And Feel"
      3) Click on button "Serialize InternalFrame"
      4) It will throw Exception in console
      5) Now try serializing in someother look and feel it will
         give message ""Successfully serialized JInternalFrame" on console

      Tested on Tiger b30

      Following is the exception message when serializing JInternalFrame under Motif
      ----------------------------------------------
      Failed serializing javax.swing.JInternalFrame
      java.io.NotSerializableException: javax.swing.JMenuItem$MenuItemPropertyChangeListener
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1072)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1366)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1338)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1281)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1070)
      at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1242)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1066)
      at java.io.ObjectOutputStream.access$100(ObjectOutputStream.java:135)
      at java.io.ObjectOutputStream$PutFieldImpl.writeFields(ObjectOutputStream.java:1509)
      at java.io.ObjectOutputStream.writeFields(ObjectOutputStream.java:418)
      at java.awt.Container.writeObject(Container.java:3452)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:489)
      at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:902)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1330)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1281)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1070)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1366)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1338)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1281)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1070)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
      at java.beans.PropertyChangeSupport.writeObject(PropertyChangeSupport.java:427)
      at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:489)
      at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:902)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1330)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1281)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1070)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1366)
      at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:380)
      at java.awt.Component.writeObject(Component.java:7363)
      at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:489)
      at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:902)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1330)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1281)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1070)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
      at SerializeTest.serializeObject(SerializeTest.java:152)
      at SerializeTest.main(SerializeTest.java:140)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kizune Alexander Zuev
              Reporter:
              hsinghsunw Hemant Singh (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: