Details
-
Type: Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.2.1
-
Component/s: None
-
Labels:None
-
JDK version and platform:java version "1.4.2_11" on Linux
Description
Having a problem deserializing the following in 1.2.1
(it does deserialize fine in 1.1.2)
<list class="java.util.Arrays-ArrayList">
<a>
<string>cad w/o fees</string>
<string>susp</string>
<string>late</string>
<string>badck</string>
<string>other</string>
<string>corp</string>
</a>
</list>
The error I get is:
Caused by: com.thoughtworks.xstream.mapper.CannotResolveClassException:
java.util.Arrays-ArrayList : Can't locate java.util.Arrays-ArrayList
class
[java] at
com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:49)
[java] at
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
[java] at
com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:72)
[java] at
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
[java] at
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
[java] at
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
[java] at
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
[java] at
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
[java] at
com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:60)
[java] at
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
[java] at
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
[java] at
com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:76)
[java] at
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
[java] at
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
[java] at
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
[java] at
com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:34)
[java] at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.determineType(AbstractReflectionConverter.java:263)
[java] at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:165)
[java] at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:121)
[java] at
com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)
I need to get 1.2.1 to be backwards compatible somehow.
Hello Padraic,
this is caused by the different encoding of names on XML tags that was introduced with XStream 1.2. See the FAQ how to create a compatible 1.1.x XStream processing or ask on the user's list for other approaches (there are more possibilities).