This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

InstantiationException with XMLEncoder  RSS feed

 
Alejandro Barrero
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting InstantiationException with XMLEncoder. However, the class has a no arguments constructor and doesn't use enum; I even made it Serializable.
Can somebody help me?

Thanks,

Alejandro Barrero
 
Alejandro Barrero
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found the problem. I was testing with

XMLEncoder encoder = new XMLEncoder(bufferred);
encoder.writeObject(System.out);

and this gives the exception.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!