Meaningless Drivel is fun!*
The moose likes XML and Related Technologies and the fly likes xstream library problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "xstream library problem" Watch "xstream library problem" New topic
Author

xstream library problem

Lucas Smith
Ranch Hand

Joined: Apr 20, 2009
Posts: 804
    
    1

I have a problem. I want to to save the JavaBean object to XML file:


Everything is OK to that point. The output file is created correctly and the aliases from annotations are set.

But, when I want to create the object from the same XML file:


I have the following exception:


Any ideas? I do not know what is wrong. Everything looks fine in the code.


SCJP6, SCWCD5, OCE:EJBD6.
BLOG: http://leakfromjavaheap.blogspot.com
Hauke Ingmar Schmidt
Rancher

Joined: Nov 18, 2008
Posts: 433
    
    2
A close look at the generated could help. Let me guess: When parametrising the XML element names, one of the names you choose was "Parametry symulacji"? As white spaces are not allowed within XML identifiers the parser treats symulacji as a second identifier, which must be an attribute name at that position, but is not followed by a value.

Xstream should not allow faulty identifiers.
Lucas Smith
Ranch Hand

Joined: Apr 20, 2009
Posts: 804
    
    1

Thank you, Hauke.
That was the key!
 
GeeCON Prague 2014
 
subject: xstream library problem