ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Vladimirov <denis.vladimi...@gmail.com>
Subject stored procedures/functions
Date Thu, 11 Aug 2005 11:27:30 GMT
Hi there,
I am trying to make a call to a stored Oracle function and I get the
following error.
What am I doing wrong?
Or what is the best and simple way to call stored functions?

Error
=======================================
The error occurred while executing query procedure.
--- Check the {? = call parameter.get_string(?)}.
--- Check the output parameters (register output parameters failed).
--- Cause: java.sql.SQLException: Invalid column type; nested
exception is com.ibatis.common.jdbc.exception.NestedSQLException:
---

My Xml file
=======================================
<parameterMap id="getStringParameterMap" class="java.util.Map">
       <parameter property="result" jdbcType="VARCHAR2"
javaType="java.lang.String" mode="OUT" />
<parameter property="param_name" jdbcType="VARCHAR2"
javaType="java.lang.String" mode="IN" />
   </parameterMap>

   <procedure id="getStringParameter" parameterMap="getStringParameterMap">
       {? = call parameter.get_string(?)}
   </procedure>


My Java src
=========================================
               Map map = new HashMap();
               map.put("result", "");
               map.put("param_name ", parameter);
               result = (String) getSqlMapClientTemplate().queryForObject(
                               "getStringParameter", map);
==========================================
Thanks,
Denis

Mime
View raw message