This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Error in updating a table in mysql using IBATIS Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "Error in updating a table in mysql using IBATIS" Watch "Error in updating a table in mysql using IBATIS" New topic
Author

Error in updating a table in mysql using IBATIS

vishnu neerukattu
Greenhorn

Joined: Aug 16, 2007
Posts: 15
Hi,
I am trying to update a table in mysql using ibatis and I have to update an enum value and I have given jdbctype for that property as varchar.
when I am executing in I am getting an error as below.can someone help me in this regard.
Please find the code below
here strModRole is declared as enum in the procedure.

<parameterMap id="addParameters" class="java.util.Map" >
<parameter property="strDrs" jdbcType="FLOAT" javaType="java.lang.Float" mode="IN"/>
<parameter property="strUts" jdbcType="FLOAT" javaType="java.lang.Float" mode="IN"/>
<parameter property="strRout" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN"/>
<parameter property="strSer" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN"/>
<parameter property="strModId" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN"/>
<parameter property="strModRole" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN"/>
</parameterMap>

<procedure id="test" parameterMap="addParameters">
{call temp.sp_SET_values(?,?,?,?,?,?)}

The error is as below
Cause: java.sql.SQLException: Data truncated for column 'in_mod_role' at row 1>
com.ibatis.common.jdbc.exception.NestedSQLException:
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Error in updating a table in mysql using IBATIS
 
Similar Threads
IBATIS - multiple parameter
Ibatis 2 procedur with cursor out parameter
iBatis Stored Procedure call
jdbctype for enum in parameterMap's parameter in IBATIS
Ibatis to pull values from dual defined in stored proc