Getting issue in calling procedure with two cursors

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Getting issue in calling procedure with two cursors

This post has NOT been accepted by the mailing list yet.
      I am working on Ibatis have a requirement that i need to call a procedure having two cursors and one 'OUT' parameters.I need to read the data coming from both cursors and OUT parameter value.I am trying from last 4 days.But i am not able to do.

My configuration is
 <resultMap id="demandResult" class="TransactionInfo" >
    <result column="DISTRICT_CODE" property="districtCode"  />
    <result column="DISTRICT_NAME" property="districtName" />
    <result column="SALES_UNIT_CODE" property="salesunitCode" />
    <result column="SALES_UNIT_NAME" property="salesunitName" />
    <result column="AREA_OFFICE_CODE" property="areaofficeCode" />
    <result column="AREAOFFICE_NAME" property="areaofficeName"  />
    <result column="PRODUCT_CODE" property="productCode" />
    <result column="PRODUCT_NAME" property="productName" />
    <result column="DIST_CHANNEL_CODE" property="distrbChannelCode" />
    <result column="INCOTERM_CODE" property="incotermCode" />
    <result column="TIME_ID" property="timePeriod"  />
    <result column="DEMAND" property="demand" />
    <result column="MIN_SHARE" property="minShare" />
    <result column="STATUS_FLAG" property="statusFlag" />
   <parameterMap id="getDemandMap" class="java.util.Map">
   <parameter property="a" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN" />
   <parameter property="b" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN" />
   <parameter property="c" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN" />
   <parameter property="d" jdbcType="ORACLECURSOR"    javaType="java.sql.ResultSet" mode="OUT" resultMap="demandResult"/>
   <parameter property="e" jdbcType="ORACLECURSOR" javaType="java.sql.ResultSet" mode="OUT" resultMap="demandResult" />
   <parameter property="f" jdbcType="VARCHAR" javaType="java.lang.String" mode="OUT"/>
    <procedure id="getDemand" parameterMap="getDemandMap" >
   { transaction_demand_pck.get_trans_demand_abstract(?,?,?,?,?,?) }
I am getting the following exception :

Exception in thread "main" com.ibatis.common.jdbc.exception.NestedSQLException:  
--- The error occurred in sql/TransactionSql.xml.  
--- The error occurred while applying a parameter map.  
--- Check the Popup.getDemandMap.  
--- Check the statement (update procedure failed).

can someone please help me to achieve this.