Why am I getting conversion exception in this code for xstream?

chris2266

New Member
I've the following test code which is not working. \[code\] XStream xStream = new XStream(new DomDriver()); xStream.alias(clazz.getName(), clazz); String test="<list><Person><lastname>abcd</lastname><phone><code>123</code><number>1234-456</number></phone><fax><code>123</code><number>9999-999</number></fax></Person></list>"; Object object = xStream.fromXML(test); clazz=Arraylist.class\[/code\]Exception Information:\[code\]com.thoughtworks.xstream.converters.ConversionException: Person : Person : Person : Person---- Debugging information ----message : Person : Personcause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassExceptioncause-message : Person : Personclass : java.util.ArrayListrequired-type : java.util.ArrayListpath : /list/Person\[/code\]
 
Back
Top