db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Müller (JIRA) <j...@apache.org>
Subject [jira] Created: (TORQUE-97) Exception NoSuchMethodError when using IDBroker with Java 1.4
Date Mon, 18 Jun 2007 19:18:26 GMT
Exception NoSuchMethodError when using IDBroker with Java 1.4

                 Key: TORQUE-97
                 URL: https://issues.apache.org/jira/browse/TORQUE-97
             Project: Torque
          Issue Type: Bug
          Components: Runtime
    Affects Versions: 3.3-RC2
         Environment: Java 1.4
            Reporter: Markus Müller

I got the exception 
    java.lang.NoSuchMethodError: java.math.BigDecimal.<init>(I)V
        at org.apache.torque.oid.IDBroker.getQuantity(IDBroker.java:747)
when using Torque Runtime 3.3-RC2 with JDK 1.4.

Java 1.5 defines additional BigDecimal constructors, one of them takes an int parameter. 
Java 1.4 has only a BigDecimal constructor with a double parameter.

I presume that the Torque library was compiled with Java 1.5 causing the problem above.

Probably the problem of line 747 may be solved with a cast as the following:
            quantity = new BigDecimal((double) 1);

Line 775 of IDBroker.java may be fixed the same way:
                quantity = new BigDecimal((double) 10);


This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message