How to map function call?

67 views
Skip to first unread message

AleBu

unread,
Oct 27, 2011, 7:08:03 AM10/27/11
to mybatis-user
Hi, I have an Oracle package with function in it which returns VARCHAR
object. Package definition for that function is:
function my_func( p_param1 in varchar2 ) return varchar2;

Mapping looks like:
<update id="my_func" parameterType="mypackage.MyFuncParam"
statementType="CALLABLE">
{#{returnValue,jdbcType=VARCHAR,javaType=String,mode=OUT}
= call MY_PACKAGE.MY_FUNC(#{param1,jdbcType=VARCHAR,mode=IN})}
</update>

MyFuncParam class contains 2 properties:
String param1;
String returnValue;

But calling that method I am having an exception like:
java.lang.ClassCastException: java.lang.Integer cannot be cast to
java.lang.String

Jeff Butler

unread,
Oct 27, 2011, 7:04:34 PM10/27/11
to mybati...@googlegroups.com
That's odd. Please post the stack trace so we can see where the
exception came from.

Jeff Butler

--
Sent from my mobile device

Reply all
Reply to author
Forward
0 new messages