I have the following iBatis mapping for an Oracle Stored Procedure that returns a true/false value.
<resultMap id="isAuthorizedResult" class="java.lang.Boolean">
<result property="isAuthorized" column="isAuthorized"/>
</resultMap>
<parameterMap id="isAuthorizedCall" class="map">
<parameter property="prgType" jdbcType="String" javaType="java.lang.String" mode="IN"/>
<parameter property="parCode" jdbcType="String" javaType="java.lang.String" mode="IN"/>
<parameter property="userId" jdbcType="String" javaType="java.lang.String" mode="IN"/>
<parameter property="Result0" jdbcType="ORACLECURSOR" javaType="java.sql.ResultSet" mode="OUT" resultMap="isAuthorizedResult"/>
</parameterMap>
<procedure id="isAuthorized" parameterMap="isAuthorizedCall">{call chk_user_ocpncy (?,?,?,?) }</procedure>
I call the mapping from my Java code like this:
getSqlMapClientTemplate().queryForObject("reexamination.isAuthorized", paramMap);
However, I get the following error...
Fail to convert to internal representation; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
What am I doing wrong? can we not store a boolean value directly into the cursor?