Good morning everyone,

I need help on something:

I'm trying to unmarshall from a huge XML into ValueObjects, but I keep 
getting erros, and I'm trying like crazy to make this work, but it has been 
a little hard. I've been using XStream for years and it always worked fine, 
but now I'm getting slapped in the face.

This huge ValueObject contains lots of primitive and complex types inside 
it, and it's complex types contains Collections of TreeSet's.

I've been managed to marshall and unmarshall Collections of ArrayLists well, 
but now with this Collections of TreeSets I just can't make it work.

Errors I've been getting:

java.lang.InstantiationError: java.util.Collection

Things I've tried:
xStream.addDefaultImplementation(Collection.class, 
MyTypeThatContainsTheCollection);
xStream.addImplicitCollection(MyTypeThatContainsTheCollection, fieldName);
xStream.alias("collectionFieldName", ArrayList.class);

Whats is the thing about XStream and Collections of TreeSet? 
I'm afraid I can't explain well where my problem is, but I do not know 
anymore. I've been trying this work for more than one week, without success.
What should I know about XStream and Collection/TreeSet. Why I can make it 
work well with Collection of ArrayList? 
I've been researching google exaustively, and I alaways see examples of 
converters, but I just can't figure it out. Should this be the solution for 
my problem? Should I implement a converter? 


Atenciosamente,
Luiz Felipe


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to