Thanks, now it works , I also had an error in my Java. Instead of
getting the updated "result" object from the Map, I passed as a
parameter to the
getSqlMapClientTemplate().queryForObject( "getStringParameter", map);
 String result = (String) map.get("result");

I was trying to use the return object from the queryForObject which was null

String result = (String) getSqlMapClientTemplate().queryForObject(
"getStringParameter", map);
and 
Map result = (Map) getSqlMapClientTemplate().queryForObject(
"getStringParameter", map);


sqlMap
==============
<parameterMap id="getStringParameterMap" class="java.util.Map">
        <parameter property="result" jdbcType="VARCHAR" 
javaType="java.lang.String" mode="OUT" />
         <parameter property="param_name" jdbcType="VARCHAR" 
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 ", "someparameter");
               getSqlMapClientTemplate().queryForObject(
"getStringParameter", map);
               String result = (String) map.get("result");
}


Thanks,
Denis




On 8/11/05, Priyesh Mashelkar <[EMAIL PROTECTED]> wrote:
> jdbcType should be VARCHAR and not VARCHAR2 i suppose.
> 
> -----Original Message-----
> From: Denis Vladimirov [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 11, 2005 4:58 PM
> To: user-java@ibatis.apache.org
> Subject: stored procedures/functions
> 
> 
> Hi there,
> I am trying to make a call Mto 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
> 
> 
> 
> MASTEK
> "Making a valuable difference"
> Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.
> In the US, we're called MAJESCO
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Opinions expressed in this e-mail are those of the individual and not that of 
> Mastek Limited, unless specifically indicated to that effect. Mastek Limited 
> does not accept any responsibility or liability for it. This e-mail and 
> attachments (if any) transmitted with it are confidential and/or privileged 
> and solely for the use of the intended person or entity to which it is 
> addressed. Any review, re-transmission, dissemination or other use of or 
> taking of any action in reliance upon this information by persons or entities 
> other than the intended recipient is prohibited. This e-mail and its 
> attachments have been scanned for the presence of computer viruses. It is the 
> responsibility of the recipient to run the virus check on e-mails and 
> attachments before opening them. If you have received this e-mail in error, 
> kindly delete this e-mail from all computers.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
>

Reply via email to