XStream
  1. XStream
  2. XSTR-285

Cannot unmarshal JTable at all

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2
    • Component/s: None
    • Labels:
      None

      Description

      The implementation of XSTR-284 revealed, that we inject an inappropriate type into a JTable:

      Stack trace:
      com.thoughtworks.xstream.converters.ConversionException: Could not call javax.swing.JTable.readObject()
      ---- Debugging information ----
      required-type : java.awt.dnd.DropTargetContext
      cause-message : null
      class : javax.swing.JTable
      message : Could not call javax.swing.JTable.readObject()
      line number : 31
      path : /javax.swing.JTable/java.awt.Component/default/dropTarget/java.awt.dnd.DropTarget/default/dropTargetContext/dropTarget
      cause-exception : java.lang.reflect.InvocationTargetException
      -------------------------------
      at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadObject(SerializationMethodInvoker.java:77)
      at com.thoughtworks.xstream.converters.reflection.SerializableConverter.doUnmarshal(SerializableConverter.java:363)
      at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:115)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:51)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:117)
      at com.thoughtworks.xstream.core.ReferenceByXPathMarshallingStrategy.unmarshal(ReferenceByXPathMarshallingStrategy.java:15)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:655)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:643)
      at com.thoughtworks.xstream.XStream.fromXML(XStream.java:593)
      at com.thoughtworks.xstream.XStream.fromXML(XStream.java:586)
      at com.thoughtworks.acceptance.JTableTest.test$$$$TODO$$$$JTable(JTableTest.java:16)
      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:324)
      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:324)
      at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadObject(SerializationMethodInvoker.java:73)
      ... 27 more
      Caused by: com.thoughtworks.xstream.converters.ConversionException: Could not call javax.swing.TransferHandler$SwingDropTarget.readObject()
      ---- Debugging information ----
      required-type : java.awt.dnd.DropTargetContext
      cause-message : null
      class : javax.swing.TransferHandler$SwingDropTarget
      message : Could not call javax.swing.TransferHandler$SwingDropTarget.readObject()
      line number : 31
      path : /javax.swing.JTable/java.awt.Component/default/dropTarget/java.awt.dnd.DropTarget/default/dropTargetContext/dropTarget
      cause-exception : java.lang.reflect.InvocationTargetException
      -------------------------------
      at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadObject(SerializationMethodInvoker.java:77)
      at com.thoughtworks.xstream.converters.reflection.SerializableConverter.doUnmarshal(SerializableConverter.java:363)
      at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:115)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:51)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)
      at com.thoughtworks.xstream.converters.reflection.SerializableConverter$3.defaultReadObject(SerializableConverter.java:329)
      at com.thoughtworks.xstream.core.util.CustomObjectInputStream.defaultReadObject(CustomObjectInputStream.java:62)
      at java.awt.Component.readObject(Component.java:6826)
      ... 32 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:324)
      at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadObject(SerializationMethodInvoker.java:73)
      ... 40 more
      Caused by: com.thoughtworks.xstream.converters.ConversionException: Cannot convert type java.util.HashMap to type javax.swing.TransferHandler$SwingDropTarget
      ---- Debugging information ----
      required-type : java.awt.dnd.DropTargetContext
      class : java.awt.dnd.DropTargetContext
      line number : 31
      path : /javax.swing.JTable/java.awt.Component/default/dropTarget/java.awt.dnd.DropTarget/default/dropTargetContext/dropTarget
      -------------------------------
      at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:161)
      at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:115)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:51)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)
      at com.thoughtworks.xstream.converters.reflection.SerializableConverter$3.readFieldsFromStream(SerializableConverter.java:297)
      at com.thoughtworks.xstream.core.util.CustomObjectInputStream.readFields(CustomObjectInputStream.java:115)
      at java.awt.dnd.DropTarget.readObject(DropTarget.java:545)
      ... 45 more

        Issue Links

          People

          • Assignee:
            Unassigned
            Reporter:
            Jörg Schaible
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: