Empty ResultSet while running Stored Procs on MyBatis 3.0.2.

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

Empty ResultSet while running Stored Procs on MyBatis 3.0.2.

This post has NOT been accepted by the mailing list yet.
Hi All ,
I am using myBatis3.0.2 version with spring.
I am facing issues while executing a stored Procedure in Sybase, it runs (without exception)  & does not  give any resultSet.

I have run normal select , insert Queries and they work fine , so I am guessing my Datasource and Drivers for Sybase are proper . However , with stored Procs I am not getting any resultSet . I am sure my Stored Proc is fine  as the same proc is returning result , If I use spring JDBC template.

I am pasting my code snippet ..Thanks in advance , if anyone can point out what I could be doing wrong.

///  My Mapper file ..
        <mapper namespace="eq">
                <resultMap id="resultTest" type="IbatisTest">
                         <id     property="key" column="CD_TYP_FAULT_CORR"/>
                        <result property="value" column="NM_TYP_FAULT_CORR"/>
                <select id="getErrorParty" statementType="CALLABLE" resultMap="resultTest">
                   {call TOPAZ..p_TZ_geterrdueto()}

Here  IBatisTest  is my Bean with key , value as instance variables inside it.
and this alias goes in my main myBatis config file .
                <typeAlias type="com.jpmorgan.pb.topazweb.equity.spring.jsonrpc.beans.IbatisTest" alias="IbatisTest"/>

 And I am calling this proc like this ..

// sqlSessionTemplate is a spring Wrapper file .
List myResult =  this.sqlSessionTemplate.selectList("eq.getErrorParty", new HashMap<String,Object>());