numeric(7,2) with EJB3 BigDecimal ?

  • I think I may have found my own answer.

    I was creating the value in the two numeric fields by using:

    protected double NUMERIC_VALUE = 0.00d;

    then,

    obj.setNumericfield( new BigDecimal( NUMERIC_VALUE ) );

    When I changed the setter statement to:

    obj.setNumericfield( new BigDecimal("0.00"));

    it started working.

    I didn't think that creating a BigDecimal with a double would cause a numeric overflow,

    but it appears that was the issue.

    BTW, we're using JDK 1.6, with JBoss 5.1.0.

Viewing post 1 (of 2 total)

You must be logged in to reply to this topic. Login to reply