ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Bennett <mark.bennett.m...@gmail.com>
Subject Re: help on com.ibatis.common.beans.ProbeException
Date Wed, 18 May 2005 14:47:11 GMT
I didn't test it myself but could it be that your parameter map says "int" 
but the actual type is "Integer"?
 Mark

 On 5/17/05, Binh Tran <binht1@staff.cellmania.com> wrote: 
> 
> Hi all,
> When I tried to execute a procedure to return type NUMBER, I got this 
> error
> message.
> 
> [java] Caused by: com.ibatis.common.beans.ProbeException: Could not set
> property 'userId' for com.cellmania.cingular.user.UserParams. Cause:
> java.lang.IllegalArgumentException: argument type mismatch
> [java] Caused by: java.lang.IllegalArgumentException: argument type
> mismatch
> [java] at
> com.ibatis.common.beans.JavaBeanProbe.setProperty(JavaBeanProbe.java:309)
> [java] at
> com.ibatis.common.beans.JavaBeanProbe.setObject(JavaBeanProbe.java:229)
> [java] at
> com.ibatis.common.beans.GenericProbe.setObject(GenericProbe.java:73)
> [java] at
> com.ibatis.sqlmap.engine.exchange.ComplexDataExchange.setData
> (ComplexDataExc
> hange.java:109)
> [java] at
> 
> com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.refreshParamete
> rObjectValues(BasicParameterMap.java:140)
> 
> My XML block is
> <typeAlias alias="UserParams2"
> type="com.cellmania.cingular.user.UserParams" />
> <parameterMap id="registerParams" class="userParams2">
> <parameter property="userId" jdbcType="NUMERIC" javaType="int"
> mode="OUT" />
> <parameter property="userName" jdbcType="VARCHAR" />
> <parameter property="password" jdbcType="VARCHAR" nullValue="" />
> <parameter property="jobTitle" jdbcType="VARCHAR" nullValue="" />
> <parameter property="level" jdbcType="VARCHAR" nullValue="" />
> <parameter property="firstName" jdbcType="VARCHAR" nullValue="" />
> <parameter property="lastName" jdbcType="VARCHAR" nullValue="" />
> <parameter property="taxId" jdbcType="VARCHAR" nullValue="" />
> <parameter property="email" />
> <parameter property="workPhone" jdbcType="VARCHAR" nullValue=""/>
> <parameter property="fax" jdbcType="VARCHAR" nullValue=""/>
> <parameter property="address1" jdbcType="VARCHAR" nullValue=""/>
> <parameter property="address2" jdbcType="VARCHAR" nullValue=""/>
> <parameter property="city" jdbcType="VARCHAR" nullValue=""/>
> <parameter property="state" jdbcType="VARCHAR" nullValue=""/>
> <parameter property="zip" jdbcType="VARCHAR" nullValue=""/>
> <parameter property="country" jdbcType="VARCHAR" nullValue=""/>
> <parameter property="companyName" jdbcType="VARCHAR" nullValue="" />
> <parameter property="companyUrl" jdbcType="VARCHAR" nullValue="" />
> </parameterMap>
> <procedure id="register" parameterMap="registerParams"
> cacheModel="UserCache">
> 
> { ? = call cingular.register( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
> ?, ?, ?, ?, ? ) }
> </procedure>
> 
> And my UserParams block is
> private Integer userId = null;
> public void setUserId(Integer userId)
> {
> this.userId = userId;
> }
> 
> public Integer getUserId()
> {
> return userId;
> }
> 
> Please help.
> 
> Binh.
> 
>

Mime
View raw message