Details
-
Type: Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.2.2
-
Component/s: None
-
Labels:None
-
JDK version and platform:Mac OS X Java 1.5.0_02
Description
com.thoughtworks.xstream.converters.ConversionException: Could not call javax.swing.JTable.readObject()
---- Debugging information ----
required-type : apple.laf.CColorPaintUIResource
cause-message : null
class : javax.swing.JTable
message : Could not call javax.swing.JTable.readObject()
line number : 472
path : /javax.swing.JTable/javax.swing.JTable/default/columnModel/listenerList/javax.swing.event.EventListenerList/javax.swing.table.JTableHeader/javax.swing.table.JTableHeader/default/defaultRenderer/javax.swing.table.DefaultTableCellRenderer/default/unselectedBackground/apple.awt.CColorPaint
cause-exception : java.lang.reflect.InvocationTargetException
-------------------------------
at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadObject(SerializationMethodInvoker.java:77)
at com.thoughtworks.xstream.converters.reflection.SerializableConverter.unmarshal(SerializableConverter.java:360)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:38)
at com.thoughtworks.xstream.core.ReferenceByXPathUnmarshaller.convertAnother(ReferenceByXPathUnmarshaller.java:39)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:99)
at com.thoughtworks.xstream.core.ReferenceByXPathMarshallingStrategy.unmarshal(ReferenceByXPathMarshallingStrategy.java:13)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:546)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:534)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:484)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:477)
at com.thoughtworks.acceptance.JTableTest.testJTable(JTableTest.java:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadObject(SerializationMethodInvoker.java:73)
... 25 more
Caused by: com.thoughtworks.xstream.converters.ConversionException: Could not call javax.swing.event.EventListenerList.readObject()
---- Debugging information ----
required-type : apple.laf.CColorPaintUIResource
cause-message : null
class : javax.swing.table.DefaultTableColumnModel
message : Could not call javax.swing.event.EventListenerList.readObject()
line number : 472
path : /javax.swing.JTable/javax.swing.JTable/default/columnModel/listenerList/javax.swing.event.EventListenerList/javax.swing.table.JTableHeader/javax.swing.table.JTableHeader/default/defaultRenderer/javax.swing.table.DefaultTableCellRenderer/default/unselectedBackground/apple.awt.CColorPaint
cause-exception : java.lang.reflect.InvocationTargetException
-------------------------------
at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadObject(SerializationMethodInvoker.java:77)
at com.thoughtworks.xstream.converters.reflection.SerializableConverter.unmarshal(SerializableConverter.java:360)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:38)
at com.thoughtworks.xstream.core.ReferenceByXPathUnmarshaller.convertAnother(ReferenceByXPathUnmarshaller.java:39)
at com.thoughtworks.xstream.converters.reflection.ReflectionConverter.unmarshal(ReflectionConverter.java:103)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:38)
at com.thoughtworks.xstream.core.ReferenceByXPathUnmarshaller.convertAnother(ReferenceByXPathUnmarshaller.java:39)
at com.thoughtworks.xstream.converters.reflection.SerializableConverter$2.defaultReadObject(SerializableConverter.java:330)
at com.thoughtworks.xstream.core.util.CustomObjectInputStream.defaultReadObject(CustomObjectInputStream.java:62)
at javax.swing.JTable.readObject(JTable.java:4035)
... 30 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadObject(SerializationMethodInvoker.java:73)
... 39 more
Caused by: com.thoughtworks.xstream.converters.ConversionException: Could not call apple.laf.CColorPaintUIResource.readObject()
---- Debugging information ----
required-type : apple.laf.CColorPaintUIResource
cause-message : null
class : javax.swing.table.JTableHeader
message : Could not call apple.laf.CColorPaintUIResource.readObject()
line number : 472
path : /javax.swing.JTable/javax.swing.JTable/default/columnModel/listenerList/javax.swing.event.EventListenerList/javax.swing.table.JTableHeader/javax.swing.table.JTableHeader/default/defaultRenderer/javax.swing.table.DefaultTableCellRenderer/default/unselectedBackground/apple.awt.CColorPaint
cause-exception : java.lang.reflect.InvocationTargetException
-------------------------------
at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadObject(SerializationMethodInvoker.java:77)
at com.thoughtworks.xstream.converters.reflection.SerializableConverter.unmarshal(SerializableConverter.java:360)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:38)
at com.thoughtworks.xstream.core.ReferenceByXPathUnmarshaller.convertAnother(ReferenceByXPathUnmarshaller.java:39)
at com.thoughtworks.xstream.converters.reflection.SerializableConverter$2.defaultReadObject(SerializableConverter.java:330)
at com.thoughtworks.xstream.converters.reflection.SerializableConverter.unmarshal(SerializableConverter.java:363)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:38)
at com.thoughtworks.xstream.core.ReferenceByXPathUnmarshaller.convertAnother(ReferenceByXPathUnmarshaller.java:39)
at com.thoughtworks.xstream.converters.reflection.SerializableConverter$2.defaultReadObject(SerializableConverter.java:330)
at com.thoughtworks.xstream.converters.reflection.SerializableConverter.unmarshal(SerializableConverter.java:363)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:38)
at com.thoughtworks.xstream.core.ReferenceByXPathUnmarshaller.convertAnother(ReferenceByXPathUnmarshaller.java:39)
at com.thoughtworks.xstream.converters.reflection.SerializableConverter$2.readFromStream(SerializableConverter.java:259)
at com.thoughtworks.xstream.core.util.CustomObjectInputStream.readObjectOverride(CustomObjectInputStream.java:66)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:333)
at javax.swing.event.EventListenerList.readObject(EventListenerList.java:255)
... 44 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadObject(SerializationMethodInvoker.java:73)
... 59 more
Caused by: java.lang.UnsupportedOperationException
at com.thoughtworks.xstream.core.util.CustomObjectInputStream.read(CustomObjectInputStream.java:211)
at apple.awt.CColorPaint.readObject(CColorPaint.java:145)
... 64 more
Issue Links
- relates to
-
XSTR-285 Cannot unmarshal JTable at all
this is because apple.laf.CColorPaintUIResource on the Mac is not serializable/externalizable. Apple's mistake.