ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reuben Firmin <reuben.fir...@cnet.com>
Subject Numeric overflow
Date Fri, 16 Dec 2005 00:32:44 GMT
Hello, I'm getting a numeric overflow from a create statement, when it 
attempts to map the auto-generated identity key to a bean value. The 
bean value is an integer, which I will certainly change to long, but I'm 
curious as to how this could happen. We've been testing the application 
for approximately one month, and have by no means generated more than 2 
billion of these objects ;)

SqlMapClient operation; uncategorized SQLException for SQL []; SQL state 
[JZ00B]; error code [0]; --- The error occurred in 
cnwk/deploy/dao/ibatisSubSystemSQL.xml. --- The error occurred while 
applying a result map. --- Check the 
SubSystem.createSubSystem-SelectKey-AutoResultMap. --- Check the result 
mapping for the 'value' property. --- Cause: java.sql.SQLException: 
JZ00B: Numeric overflow.; nested exception is 
com.ibatis.common.jdbc.exception.NestedSQLException: --- The error 
occurred in cnwk/deploy/dao/ibatisSubSystemSQL.xml. --- The error 
occurred while applying a result map. --- Check the 
SubSystem.createSubSystem-SelectKey-AutoResultMap. --- Check the result 
mapping for the 'value' property. --- Cause: java.sql.SQLException: 
JZ00B: Numeric overflow.

Here's the sqlmap statement:

    <insert id="createSubSystem" parameterClass="subsystem">
        INSERT INTO SubSystem (name)
        VALUES (#name#)
        <selectKey keyProperty="subSystemId" 
resultClass="java.lang.Integer">
            SELECT @@IDENTITY AS value
        </selectKey>
    </insert>

Mime
View raw message