Hi guys,

I have a stored procedure that returns a cursor. my Sp has only this single
OUT param. 

following is my sqlmapping:
        <resultMap id="notifications" class="lenderNtfnDTO">
        <result property="lenderId" column="LNDR_OID"/>
        <result property="lenderNotificationTypeId"
column="LNDR_NTFN_TMPL_CD"/>
        <result property="lenderQASIdentifier" column="LNDR_QAS_IND"/>
        </resultMap>
        <parameterMap id="notificationsParameterMap" class="map">               
        
                <parameter property="CO_LNDR_NTFN" javaType="java.sql.ResultSet"
jdbcType="ORACLECURSOR" mode="OUT" resultMap="notifications" />
        </parameterMap>
        <procedure id="getNotificationsByLender"
parameterMap="notificationsParameterMap" >
                {call pkg_ntfn.p_get_ntfn_by_lndr(?)}
        </procedure>

here, the procedure out param (cursor) name is "CO_LNDR_NTFN".

I call it using following - 
           HashMap map = new HashMap();
           map.put("CO_LNDR_NTFN", null);
           
           sqlMapClientTemplate.queryForObject("getNotifications", map);
           
           notificationList = (ArrayList)map.get("CO_LNDR_NTFN");          

I receive following error - 

--- The error occurred in com/.../sqlmap/SendNotificationMap.xml.  
--- The error occurred while applying a parameter map.  
--- Check the SendNotification.notificationsParameterMap.  
--- Check the statement (update procedure failed).  
--- Cause: java.sql.SQLException: Bigger type length than Maximum; nested
exception is com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in com/.../sqlmap/SendNotificationMap.xml.  
--- The error occurred while applying a parameter map.  
--- Check the SendNotification.notificationsParameterMap.  
--- Check the statement (update procedure failed).  
--- Cause: java.sql.SQLException: Bigger type length than Maximum

I do not understand the issue is with the way I am handling the resultset or
something is wrong with the procedure!

my iBatis version is 2.3.0.677 and Spring version is 1.2.7

looking forward for a reply..

Thanks,
Amit

-- 
View this message in context: 
http://www.nabble.com/IBatis-on-Spring%3A%3A-error-when-calling-SP.-the-SP-returns-cursor-tp18149219p18149219.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

Reply via email to