Pages

Thursday, October 07, 2010

java.lang.ArithmeticException: Rounding necessary

I was working with JPA, Hibernate and Netbeans. Netbeans automatically generates the entity classes from the database. But the auto generator may confuses with the number type in oracle. Sometimes it generates BigInteger and sometimes BigDecimal. In my case the auto generator made the field BigInteger but actual value in the database was decimal. Thats why  java.lang.ArithmeticException: Rounding necessary. The variable types were changed from BigInteger to BigDecimal and the Exception was no more.

1 comment:

  1. Anonymous8:05 PM

    I'm curious to find out what blog platform you happen to be working with? I'm having some small security problems with my
    latest website and I would like to find something more safe.
    Do you have any solutions?

    Look into my web-site; bankruptcy attorney florida

    ReplyDelete