You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by sungk <ga...@gmail.com> on 2009/11/13 23:15:13 UTC
Stored Procudure call with resultClass="java.util.HashMap"
Hi
I am trying to use ibatis to make a stored procedure call as below:
<procedure id="get_products" resultClass="java.util.HashMap"
remapResults="true">
{call sel_products('ALL')}
</procedure>
And my java code is:
List<Map> results = getSqlMapClientTemplate().queryForList("get_products");
However this jsut hangs and does not return back.
Turning the sql log, looks like the procedure has been called and got the
resultset back.
However this works if I change to:
<resultMap id="productresults" class="java.util.HashMap">
<result property="product_id" column="PRODUCT_ID"/>
</resultMap>
<procedure id="get_products" resultMap="productresults">
{call sel_products('ALL')}
</procedure>
Also a plain select with resultClass works as well.
I am using version 2.3.4.726
Wondering if I am doing something wrong here for the procedure call with
resultClass
-Sungk
--
View this message in context: http://old.nabble.com/Stored-Procudure-call-with-resultClass%3D%22java.util.HashMap%22-tp26344382p26344382.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org
Probe Exception
Posted by sungk <ga...@gmail.com>.
After running in debug mode, seems like I am getting an exception:
com.ibatis.common.beans.ProbeException: The 'COUPON_DATE' property of the
java.util.HashMap class is not a List or Array.
Any idea how to get over this
-sungk
sungk wrote:
>
> Hi
>
> I am trying to use ibatis to make a stored procedure call as below:
> <procedure id="get_products" resultClass="java.util.HashMap"
> remapResults="true">
> {call sel_products('ALL')}
> </procedure>
>
> And my java code is:
> List<Map> results =
> getSqlMapClientTemplate().queryForList("get_products");
>
> However this jsut hangs and does not return back.
> Turning the sql log, looks like the procedure has been called and got the
> resultset back.
>
> However this works if I change to:
>
> <resultMap id="productresults" class="java.util.HashMap">
> <result property="product_id" column="PRODUCT_ID"/>
> </resultMap>
>
> <procedure id="get_products" resultMap="productresults">
> {call sel_products('ALL')}
> </procedure>
>
> Also a plain select with resultClass works as well.
>
> I am using version 2.3.4.726
>
> Wondering if I am doing something wrong here for the procedure call with
> resultClass
> -Sungk
>
--
View this message in context: http://old.nabble.com/Stored-Procudure-call-with-resultClass%3D%22java.util.HashMap%22-tp26344382p26347145.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org