saros-logo-320px

Solving XStream-related problem

Just a quickie post to advertise a solution we on the Saros team found to a quite serious problem resulting from the release of Java 7.

In testing, Saros was functioning fine with Java 6 users, but Java 7 users experienced problems that we only found through looking at the error log:
ERROR 2011-07-29 16:43:38,942 (XStreamExtensionProvider.java:272) Malformed data received!
com.thoughtworks.xstream.converters.ConversionException: Cannot construct de.fu_berlin.inf.dpp.net.internal.XStreamExtensionProvider$XStreamPacketExtension as it does not have a no-args constructor

...

---- Debugging information ----
message             : Cannot construct de.fu_berlin.inf.dpp.net.internal.XStreamExtensionProvider$XStreamPacketExtension as it does not have a no-args constructor
cause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message       : Cannot construct de.fu_berlin.inf.dpp.net.internal.XStreamExtensionProvider$XStreamPacketExtension as it does not have a no-args constructor
class               : de.fu_berlin.inf.dpp.net.internal.XStreamExtensionProvider$XStreamPacketExtension
required-type       : de.fu_berlin.inf.dpp.net.internal.XStreamExtensionProvider$XStreamPacketExtension
path                : /sarosVersion
line number         : 107
-------------------------------
etc.

We traced this problem to the XStream library, which we use to serialise objects for sending over a network. As Saros is a distributed development tool, it was quite important that this didn’t break.

We had been using version 1.3.1 of XStream, which is the latest official version. At the moment, XStream has no official version later than this and has no planned release date (see this forum post), but does make regular daily builds of 1.4 available here. Rather than go without Java 7 support, we decided to incorporate the latest daily build in Saros. We’re happy to say that this fixes the problem and Saros works as reliably as before. If you have similar problems and use XStream, this would be a possible solution for you.

Let me therefore stress to our users that if you upgrade to Java 7, you must use the latest version of Saros, which will be released in the next couple of days after our acceptance testing has been completed. Older versions will only work with Java 6.

Watch this space for a release announcement.

4 thoughts on “Solving XStream-related problem

  1. Pingback: New release future-proofs Saros | Computer Floss
  2. Two and a half years later, this solved my problem. Thanks for the post! Yet more evidence that blogging your solutions can help others in the future

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>