David Withers wrote: > Hi All, > > I've added some new features to the spreadsheet import plugin and, as a > result, two new fields to the activity configuration. The new plugin > works fine but when I try and open a workflow that was built with the > older version of the plugin I get a 'Could not deserialise dataflow' > exception. > > If I'd removed some fields from the configuration I'd expect the > serialization to break but I thought adding fields would be safe. The > XStream FAQ > (http://xstream.codehaus.org/faq.html#Serialization_newer_class_versions) > confirms this but it doesn't seem to be how it actually works. > > If I add the new properties to the serialized workflow then it loads in > Taverna so it seems that the missing properties are the cause of the > problem. > > I get the same behaviour on Windows XP and OS X Snow Leopard. > > Any ideas on how I can work around this. > > David. >
After investigating some more I've found that although the XStream docs say "If a new field is added to the class, deserializing an old version will leave the field uninitialized", this is not the case. String fields are initialized to null, even if you set a default value for the field. If you add an enum field then an exception is thrown (which is the problem I'm hitting). Taverna is using an old version of XStream - 1.2.1 (November 2006). The docs on the website must refer to the latest version - 1.3.1 (December 2008), which would explain the discrepancy. Is updating XStream to the latest version an option, or does Taverna need to use version 1.2.1 for some reason? David. -- David Withers School of Computer Science, University of Manchester, Oxford Road, Manchester, M13 9PL, UK. +44 (0)161 275 0683 ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ taverna-hackers mailing list [email protected] Web site: http://www.taverna.org.uk Mailing lists: http://www.taverna.org.uk/taverna-mailing-lists/ Developers Guide: http://www.mygrid.org.uk/tools/developer-information
