When I run this db2 query:
caller = (Caller)sqlMap.queryForObject("getIPCTData", caller);
I get an error message of "cursor state not valid".
I verified that the stored procedure works correctly when run manually in a db2 screen.
The sql config file is as follows:
<parameterMap id="IPCTParameters" class="com.mbh.esln.sra.domain.Caller">
<parameter property="callerLastName" mode="INOUT" jdbcType="CHAR" javaType="java.lang.String"/>
<parameter property="callerFirstName" mode="INOUT" jdbcType="CHAR" javaType="java.lang.String"/>
<parameter property="callerPhone" mode="INOUT" jdbcType="CHAR" javaType="java.lang.String"/>
<parameter property="callerPhoneExt" mode="INOUT" jdbcType="CHAR" javaType="java.lang.String"/>
<parameter property="callerType" mode="INOUT" jdbcType="CHAR" javaType="java.lang.String"/>
<parameter property="account" mode="INOUT" jdbcType="CHAR" javaType="java.lang.String"/>
<parameter property="memberId" mode="INOUT" jdbcType="CHAR" javaType="java.lang.String"/>
<parameter property="memberLastName" mode="INOUT" jdbcType="CHAR" javaType="java.lang.String"/>
<parameter property="memberFirstName" mode="INOUT" jdbcType="CHAR" javaType="java.lang.String"/>
<parameter property="callDate" mode="INOUT" jdbcType="DECIMAL" javaType="java.lang.String"/>
<parameter property="companyNumber" mode="INOUT" jdbcType="CHAR" javaType="java.lang.String"/>
<parameter property="contractNumber" mode="INOUT" jdbcType="CHAR" javaType="java.lang.String"/>
<parameter property="okToCall" mode="INOUT" jdbcType="CHAR" javaType="java.lang.String"/>
<parameter property="returnCode" mode="INOUT" jdbcType="CHAR" javaType="java.lang.String"/>
<parameter property="transNo" mode="IN" jdbcType="CHAR"/>
<parameter property="subTransNo" mode="IN" jdbcType="DECIMAL"/>
<parameter property="recordSequence" mode="IN" jdbcType="DECIMAL"/>
</parameterMap>
<procedure id="getIPCTData" parameterMap="IPCTParameters" resultClass="com.mbh.esln.sra.domain.Caller">
{call DMCLIB.IPCTSndDtaSRA(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
</procedure>
Any ideas why the error message occurs?
Thanks in advance.
Steve Jagels
Sr. Programmer / Analyst
(314)
Jagels, Steve E.'s gravatar image asked Mar 2 2005 at 22:04 in Ibatis-User-Java by Jagels, Steve E.

1 Answers

Looks like you are working on an AS/400. ;-)
This happens when a procedure closes the data set to be returned before iBATIS has read it...there is something you have to do in db2 to make it work, but I do not have it handy.
I will post it tomorrow from work.
Larry
Larry Meadors's gravatar image answered Mar 6 2005 at 23:00 by Larry Meadors