Its not yet documented. Can you tell me how to do that if you have any idea.
-----Original Message----- From: Daniel Henrique Ferreira e Silva [mailto:[EMAIL PROTECTED] Sent: Wed 10/5/2005 8:15 AM To: user-java@ibatis.apache.org Cc: Subject: Re: Invoke oracle function returing oracle type Ruchi, iBATIS can't figure out complex types. You'll have to write a custom type handler to use CLIENTINFO complex type. Look at iBATIS wiki page. There you'll find a sample of how to write one custom type handler. Hope that helped, Daniel Silva. On 10/5/05, Ahuja, Ruchi <[EMAIL PROTECTED]> wrote: > > > 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 >
<<winmail.dat>>