Problems with XMLEncoder and BigDecimal

Discussion in 'Java' started by Cory Musselman, Oct 30, 2003.

  1. I am trying to use XMLEncoder to encode a bean class that uses
    BigDecimal, since BigDecimal doesn't have a default constructor I get
    the errors below when I call:
    Are they ways to work around this problem?

    XMLEncoder e = new XMLEncoder(new BufferedOutputStream(new
    FileOutputStream("Test2.xml)));
    e.writeObject(o); //
    e.close();

    java.lang.InstantiationException: java.math.BigDecimal
    Continuing ...
    java.lang.RuntimeException: failed to evaluate:
    <unbound>=BigDecimal.new();
    Continuing ...
    java.lang.reflect.InvocationTargetException
    Continuing ...
    Cory Musselman, Oct 30, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George Armhold
    Replies:
    1
    Views:
    1,451
    Chris Riesbeck
    Sep 2, 2004
  2. Replies:
    3
    Views:
    1,213
  3. Replies:
    0
    Views:
    603
  4. Stanimir Stamenkov
    Replies:
    4
    Views:
    2,564
    Stanimir Stamenkov
    Jul 18, 2008
  5. Ramon
    Replies:
    12
    Views:
    1,333
Loading...

Share This Page