History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XSTR-255
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Assignee: Unassigned
Reporter: Mauro Talevi
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XStream

JTableTest fails on Mac OS X

Created: 13/Nov/05 11:59 AM   Updated: 24/May/07 04:33 AM
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2.2

Issue Links:
Related
 

JDK version and platform: Mac OS X Java 1.5.0_02


 Description  « Hide
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

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Paul Hammant - 09/Feb/06 09:48 AM
this is because apple.laf.CColorPaintUIResource on the Mac is not serializable/externalizable. Apple's mistake.

Joerg Schaible - 16/Mar/06 06:23 PM
JVM impl on Mac OS might internally check the type and fail, since we inject something invalid.

Joerg Schaible - 07/May/07 04:47 PM
Mauro, can you test if latest version in svn solves this? I noticed at the bottom of the stack trace, that XStream had thrown the causing exception due to a lack of raw byte read support in the CustomObjectInputStream (although it supports writing them).

Mauro Talevi - 24/May/07 04:33 AM
It does indeed. Removed mac-specific filter on tests.