ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ahuja, Ruchi" <ruchi.ah...@fmr.com>
Subject Invoke oracle function returing oracle type
Date Wed, 05 Oct 2005 11:42:42 GMT
Hi,

I am trying to call an Oracle function using ibatis. While doing so i
get the following error - 
--- Check the output parameters (register output parameters failed).  
--- Cause: java.sql.SQLException: Parameter Type Conflict:
sqlType=-99999999

Oracle function is as follows -
 FUNCTION getClientInfo ( clientId IN varchar2, serviceName IN varchar2,
isNew char) RETURN CLIENTINFO; 

Here CLIENTINFO is Oracle OBJECT TYPE.

The ibatis sqlMap is -
 <sqlMap> 
<resultMap id="GetClientInfo-result-map" class="client.ClientInfo"> 
.... 
</resultMap> 
<parameterMap id="GetClientInfo-param-map" class="java.util.Map"> 
<parameter property="result" jdbcType="OBJECT" typeName="CLIENTINFO"
mode="OUT"/> 
<parameter property="clientId" jdbcType="VARCHAR2"
javaType="java.lang.String" mode="IN" /> 
<parameter property="serviceName" jdbcType="VARCHAR2"
javaType="java.lang.String" mode="IN" /> 
<parameter property="isNew" jdbcType="CHAR" javaType="java.lang.String"
mode="IN" /> 
</parameterMap> 
<procedure id="GetClientInfo" parameterMap="GetClientInfo-param-map"
resultMap="GetClientInfo-result-map"> 
{? = call getClientInfo(?, ?, ?) }</procedure> 
</sqlMap> 
	 
My DAO code is as follows - 
Map params = new HashMap(); 
params.put("clientId", clientId); 
params.put("serviceName", serviceName); 
params.put("isNew", "Y"); 
ClientInfo result =
(ClientInfo)getSqlMapClientTemplate().queryForObject("GetClientInfo",
params); 
	 
Can anyone tell me what I am doing wrong.

Regards,
Ruchi

"Any comments or statements made in this email are not necessarily those
of Fidelity Business Services India Pvt. Ltd. or any of the Fidelity
Investments group companies. The information transmitted is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material. If you have received this in
error, please contact the sender and delete the material from any
computer. All e-mails sent from or to Fidelity Business Services India
Pvt. Ltd. may be subject to our monitoring procedures."


Mime
View raw message