XStream
  1. XStream
  2. XSTR-674

Update to XStream 1.4.1 throws exception

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.4.1
    • Fix Version/s: 1.4.2
    • Component/s: Compatibility, Converters, Core
    • Labels:
      None

      Description

      After updating XStream version from 1.3.1 to 1.4.1 we have received following exception:

      java.lang.NoSuchMethodError: com.thoughtworks.xstream.core.util.CustomObjectInputStream.getInstance(Lcom/thoughtworks/xstream/converters/DataHolder;Lcom/thoughtworks/xstream/core/util/CustomObjectInputStream$StreamCallback;)Lcom/thoughtworks/xstream/core/util/CustomObjectInputStream;
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
      at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
      at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:61)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
      at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1034)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1018)
      at com.thoughtworks.xstream.XStream.fromXML(XStream.java:894)
      After investigating this issue I've found that CustomObjectInputStream.getInstance method signature was broken. As the result all configs were unreadable. Could you please add CustomObjectInputStream#getInstance(DataHolder whereFrom, CustomObjectInputStream.StreamCallback callback) method for backward compatibility or propose some workaround?

        Activity

        Hide
        Jörg Schaible added a comment -

        Just as a side note, package c.t.x.core.util is normally supposed to be internal. Nevertheless, bringing back binary compatibility was easy in this case. I've added a deprecated method with the original signature and old behavior again. Applied to trunk.

        Show
        Jörg Schaible added a comment - Just as a side note, package c.t.x.core.util is normally supposed to be internal. Nevertheless, bringing back binary compatibility was easy in this case. I've added a deprecated method with the original signature and old behavior again. Applied to trunk.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: