• Post Reply Bookmark Topic Watch Topic
  • New Topic

Serialization of Java Objects to XML Problem  RSS feed

 
Greg Pata
Ranch Hand
Posts: 31
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
It seems I am not able to serialize an ArrayList<NonTrivialObject>() to xml...
Here is the debug code:



The output is:


I do not know how to correct this.

Thank you for your help.
 
Tony Docherty
Bartender
Posts: 3195
78
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The ZRow class needs to have a public no args constructor.
 
Greg Pata
Ranch Hand
Posts: 31
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tony Docherty wrote:The ZRow class needs to have a public no args constructor.

Indeed, thank you Tony.
 
Tony Docherty
Bartender
Posts: 3195
78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My pleasure.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!