Hello,
I have recently upgraded from XStream1.1.2 to 1.4.2 to overcome a problem
that appeared when running my java application with java7.
However, when I now try to load a data object that was saved using XStream
1.1.2 I am getting the following Error message, concerning one of my data
structures that is derived from java.util.Hashtable:
---- Debugging information ----
message : Could not call
edu.tau.compbio.util.OrderedHash.readObject()
cause-exception :
com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : edu.tau.compbio.io.IOMgr-Constraints
class : edu.tau.compbio.util.OrderedHash
required-type : edu.tau.compbio.util.OrderedHash
converter-type :
com.thoughtworks.xstream.converters.reflection.SerializableConverter
path :
/expander.ds.MainData/studies/entry/expander.ds.PreprocGEData/preprocOps/expander.ds.FilterSol/opInput/_inputDef/hashtable/edu.tau.compbio.io.IOMgr-Constraints
class[1] : edu.tau.compbio.io.IOMgr
converter-type[1] :
com.thoughtworks.xstream.converters.reflection.ReflectionConverter
class[2] : expander.ds.FilterSol
class[3] : java.util.ArrayList
converter-type[2] :
com.thoughtworks.xstream.converters.collections.CollectionConverter
class[4] : expander.ds.PreprocGEData
class[5] : java.util.Hashtable
converter-type[3] :
com.thoughtworks.xstream.converters.collections.MapConverter
class[6] : expander.ds.MainData
version : null
-------------------------------
I have tried adding the following code to my OrderedHash class:
private void writeObject(ObjectOutputStream oos) throws
IOException {
System.out.println("writing...");
oos.defaultWriteObject();
System.out.println("wrote...");
}
private void readObject(ObjectInputStream ois) throws IOException,
ClassNotFoundException {
System.out.println("reading");
ois.defaultReadObject();
System.out.println("read");
}
This did not solve the problem.
I also tried adding the code
xstream.setClassLoaded(new CompositeClassLoader());
right after creating the xstream object but no luck there either.
Any suggestions will be most appreciated....
Thanks
Adi
--
View this message in context:
http://old.nabble.com/ConversionException-when-using-XStream-1.4.2-caused-by-CannotResolveClassException-tp34199308p34199308.html
Sent from the xstream - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email