ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: Calling a SP throws TypeException
Date Thu, 07 Jan 2010 18:40:38 GMT
That's a bug.  I think it's fixed in the trunk, but I'll double check
when I'm back at my computer.

On 2010-01-07, [e2n] software | Björn Raupach <raupach@e2n.de> wrote:
> I changed UserMapping.xml
>
> <update id="validate" parameterType="hashmap" statementType="CALLABLE">
> 		{call dbo.usp_LoginUser(#{username, mode=IN, jdbcType=VARCHAR,
> javaType=java.lang.String},
> 							  #{password, mode=IN, jdbcType=VARCHAR, javaType=java.lang.String},
> 							  #{valid, mode=OUT, jdbcType=BIT, javaType=java.lang.Boolean})}
> 	</update>
>
> But still:
> ### Cause: org.apache.ibatis.type.TypeException: Could not resolve type
> alias 'IN'.  Cause: java.lang.ClassNotFoundException: Cannot find class: IN
>
>
>
> -------- Original Message --------
> Subject: Calling a SP throws TypeException (07-Jan-2010 16:31)
> From:    [e2n] software | Björn Raupach <raupach@e2n.de>
> To:      raupach@e2n.de
>
>> Hello,
>>
>> while trying to call a Stored Procedure I received the following
>> execption.
>> The documentation doesn't cover much about how to handle Stored Procedures
>>
>> so I thought I am better of asking this here.
>>
>> My setp up is iBatis 3.0 Beta 7 and a SQL Server 2008.
>>
>> In tsql I call my sp like this:
>> DECLARE @valid AS BIT
>> EXECUTE usp_LoginUser 'some_user', 'pass', @valid OUT
>> SELECT @valid
>>
>> In my UserMapping.xml I declared:
>> <update id="validate" parameterType="hashmap" statementType="CALLABLE">
>>
>> EXECUTE usp_LoginUser #{username,jdbcType=VARCHAR, javaType=String,
>> mode=IN}
>> , #{password, jdbcType=VARCHAR, javaType=String, mode=IN}, #{valid,
>> jdbcType=BIT, javaType=Boolean, mode=OUT}
>> </update>
>>
>> and finally the calling code looks like this:
>>
>> UserMapper mapper = session.getMapper(UserMapper.class);
>> Boolean valid = Boolean.FALSE;
>> Map m = new HashMap();
>> m.put("username", username);
>> m.put("password", password);
>> m.put("valid", valid);
>> mapper.validate(m);
>>
>> My unit test fails with the following error:
>>
>> org.apache.ibatis.exceptions.IbatisException:
>> ### Error updating database.  Cause: org.apache.ibatis.type.TypeException:
>>
>> Could not resolve type alias 'IN'.  Cause:
>> java.lang.ClassNotFoundException:
>>  Cannot find class: IN
>> ### The error may exist in de/e2n/stadtlichter/db/data/UserMapper.xml
>> ### The error may involve de.e2n.stadtlichter.db.data.UserMapper.validate
>> ### The error occurred while executing an update
>> ### Cause: org.apache.ibatis.type.TypeException: Could not resolve type
>> alias 'IN'.  Cause: java.lang.ClassNotFoundException: Cannot find class:
>> IN
>>  at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(
>> ExceptionFactory.java:8)
>>  at org.apache.ibatis.session.defaults.DefaultSqlSession.update(
>> DefaultSqlSession.java:95)
>>  at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:55)
>>  at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:18)
>>
>> Any help would be appreciated. Thanks in advance.
>>
>> Btw, there is a typo in the documentation.
>> p21. delete - A mapped DELEETE statement
>> ...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>

-- 
Sent from my mobile device

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message