2 Replies Latest reply on Mar 12, 2005 7:40 PM by Randahl Fink Isaksen

    Double trouble: Invalid numeric parameter

    Randahl Fink Isaksen Novice

      JBoss: 3.1
      Hibernate: 2.1
      SapDB: 7

      I have been stuck for some time with the exception shown below which is thrown whenever I try to persist entities which contain properties of type double. During the debugging process I am mapping my java doubles to the sql type Float(38) which is the most precise sapdb floating point numbers, containing up to 38 digits (not bits) which should be more than enough to represent Java doubles which contain a 52 bit number (the mantissa) and an 11 bit exponent. It does not matter what my double values are - the exception is thrown EVEN if I try to persist 0.0.

      If anyone could come up with an idea what could be wrong, I would be grateful.



      Caused by: com.sap.dbtech.jdbc.exceptions.DatabaseException: [-3018] (at 85): In
      valid numeric parameter
      at com.sap.dbtech.jdbc.packet.ReplyPacket.createException(ReplyPacket.ja
      at com.sap.dbtech.jdbc.ConnectionSapDB.throwSQLError(ConnectionSapDB.jav
      at com.sap.dbtech.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:422)

      at com.sap.dbtech.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:316)

      at com.sap.dbtech.jdbc.CallableStatementSapDB.execute(CallableStatementS
      at com.sap.dbtech.jdbc.CallableStatementSapDB.execute(CallableStatementS
      at com.sap.dbtech.jdbc.CallableStatementSapDB.executeUpdate(CallableStat
      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdat
      at net.sf.hibernate.persister.NormalizedEntityPersister.update(Normalize
      ... 42 more