Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 73518 invoked from network); 30 Jan 2008 21:43:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jan 2008 21:43:46 -0000 Received: (qmail 16489 invoked by uid 500); 30 Jan 2008 21:43:35 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 16455 invoked by uid 500); 30 Jan 2008 21:43:35 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 16444 invoked by uid 99); 30 Jan 2008 21:43:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2008 13:43:35 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [204.17.31.254] (HELO AMSGEG02.apollogrp.edu) (204.17.31.254) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2008 21:43:20 +0000 Received: from amsgfe02.apollogrp.edu ([10.17.144.39]) by AMSGEG02.apollogrp.edu with InterScan Message Security Suite; Wed, 30 Jan 2008 14:44:49 -0700 Received: from AMSGEV41.apollogrp.edu ([10.29.167.8]) by amsgfe02.apollogrp.edu with Microsoft SMTPSVC(6.0.3790.1830); Wed, 30 Jan 2008 14:44:48 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C86389.563A5640" Subject: RE: Weird IN OUT Param problem. Date: Wed, 30 Jan 2008 14:44:57 -0700 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Weird IN OUT Param problem. Thread-Index: AchjiNQu2L3U0/77SU6lYvHhJweiPAAACVxQ From: "Sundar Sankaranarayanan" To: X-OriginalArrivalTime: 30 Jan 2008 21:44:48.0693 (UTC) FILETIME=[56240650:01C86389] X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------_=_NextPart_001_01C86389.563A5640 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks for the immediate response Jeff. =20 My sql-map is something like this. =20 {call example(?,?,?,?,?,?,?,?,?,?,?)} =20 =20 The last 2 params are float in the Database. I am not sure if this has something to do with the procedure returning multiple out params. ________________________________ From: Jeff Butler [mailto:jeffgbutler@gmail.com]=20 Sent: Wednesday, January 30, 2008 2:39 PM To: user-java@ibatis.apache.org Subject: Re: Weird IN OUT Param problem. Make sure you are specifying the jdbcType of the out/inout parameters in your parameter map. =20 Jeff Butler On Jan 30, 2008 3:37 PM, Sundar Sankaranarayanan wrote: Hi All,=20 I have a stored procedure, which is something like this. =20 call example(?,?,?,?,?,?) =20 The first four params are IN params and the last 2 are out params. If I set the mode=3D"OUT" or set the mode as "INOUT" in the sql-map xml file I get a=20 =20 =20 --- Cause: java.sql.SQLException : Invalid column type; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:=20 --- The error occurred in ibatis/config/procedures/example.xml.=20 --- The error occurred while executing query procedure.=20 --- Check the {call example(?,?,?,?,?,?)} --- Check the output parameters (register output parameters failed).=20 --- Cause: java.sql.SQLException: Invalid column type at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translat e(SQLStateSQLExceptionTranslator.java:121) at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.tran slate(SQLErrorCodeSQLExceptionTranslator.java:322) at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClient Template.java:197) at org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResul t(SqlMapClientTemplate.java:220) at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapC lientTemplate.java:267) at com.apollo.sisaw.entry.dao.implementation.IbatisTranscriptActivityDaoImp l.insertTranscriptActivity(IbatisTranscriptActivityDaoImpl.java:408) at com.apollo.sisaw.entry.dao.implementation.IbatisTranscriptActivityDaoImp lTest.testInsertTranscriptActivity(IbatisTranscriptActivityDaoImplTest.j ava:197) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) .=20 The procedure does run fine if I change the mode to "IN" but the values that I expect to be set into the input map I provide is being set as null. I dont know what has to be done. I am using Spring with Ibatis together and have an oracle database. Any help on this is appreciated. =20 =20 Thanks and Regards Sundar . ------_=_NextPart_001_01C86389.563A5640 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Thanks for the immediate response = Jeff.
 
My sql-map is something like = this.
 

<sqlMap>

<parameterMap id=3D"exampleParam" class=3D"map">

<parameter property=3D"p_irn" jdbcType=3D"NUMBER" = javaType=3D"java.lang.Long" = mode=3D"IN" />

<parameter property=3D"p_orga_number" jdbcType=3D"NUMBER" = javaType=3D"java.lang.Long" = mode=3D"IN" />

<parameter property=3D"p_csph" jdbcType=3D"NUMBER" = javaType=3D"java.lang.Long" = mode=3D"IN" />

<parameter property=3D"p_grade" jdbcType=3D"VARCHAR" = javaType=3D"java.lang.String"=20 mode=3D"IN" = />

<parameter property=3D"p_activity_id" jdbcType=3D"VARCHAR" = javaType=3D"java.lang.String"=20 mode=3D"IN" = />

<parameter property=3D"p_activity_title" jdbcType=3D"VARCHAR" javaType=3D"java.lang.String"=20 mode=3D"IN" = />

<parameter property=3D"p_term_date" jdbcType=3D"DATE" = javaType=3D"java.sql.Date" = mode=3D"IN" />

<parameter property=3D"p_cred_att" jdbcType=3D"NUMBER" = javaType=3D"java.lang.Double"=20 mode=3D"IN" = />

<parameter property=3D"p_reuse_code" jdbcType=3D"VARCHAR" = javaType=3D"java.lang.String"=20 mode=3D"IN" = />

<parameter property=3D"p_tran_act_oid" jdbcType=3D"NUMBER" = javaType=3D"java.lang.Long"=20 mode=3D"INOUT"/>

<parameter property=3D"p_clas_rost_#" jdbcType=3D"NUMBER" = javaType=3D"java.lang.Long" = mode=3D"INOUT"/>

</parameterMap>

<procedure id=3D"example"

parameterMap=3D"exampleParam">

{call example(?,?,?,?,?,?,?,?,?,?,?)}<= /P>

</procedure>

</sqlMap>

 
 
The = last 2 params=20 are float in the Database. I am not sure if this has something to do = with the=20 procedure returning multiple out params.


From: Jeff Butler = [mailto:jeffgbutler@gmail.com]=20
Sent: Wednesday, January 30, 2008 2:39 PM
To:=20 user-java@ibatis.apache.org
Subject: Re: Weird IN OUT Param=20 problem.

Make sure you are specifying the jdbcType of the out/inout = parameters in=20 your parameter map.
 
Jeff Butler

On Jan 30, 2008 3:37 PM, Sundar = Sankaranarayanan <Sundar.Sankaranarayan= an@phoenix.edu>=20 wrote:
Hi All,
I have a stored = procedure,  which is=20 something like this.
 
call=20 example(?,?,?,?,?,?)
 
The first four params are IN = params and the=20 last 2 are out params. If I set the mode=3D"OUT" or set the mode as = "INOUT" in=20 the sql-map xml file I get a
 
 

         =       =20 --- Cause: java.sql.SQLException

: Invalid column type; nested exception is = com.ibatis.common.jdbc.exception.NestedSQLException:

         &nbs= p;     =20 --- The error occurred in=20 ibatis/config/procedures/example.xml.

         &nbs= p;     =20 --- The error occurred while executing query procedure.=20

         &nbs= p;     =20 --- Check the {call=20 example(?,?,?,?,?,?)}

         &nbs= p;     =20 --- Check the output parameters (register output parameters = failed).=20

        &n= bsp;      =20 --- Cause:=20 java.sql.SQLException: = Invalid column=20 type

         =       =20 at=20 = org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate= (SQLStateSQLExceptionTranslator.java:121)

         =       =20 at=20 = org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.trans= late(SQLErrorCodeSQLExceptionTranslator.java:322)

         =       =20 at=20 = org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:197)

         =       =20 at=20 = org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult= (SqlMapClientTemplate.java:220)

         =       =20 at=20 = org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(<= U>SqlMapClientTemplate.java:267)

         =       =20 at=20 = com.apollo.sisaw.entry.dao.implementation.IbatisTranscriptActivityDaoImpl= .insertTranscriptActivity(IbatisTranscriptActivityDaoImpl.java:408)

         =       =20 at=20 = com.apollo.sisaw.entry.dao.implementation.IbatisTranscriptActivityDaoImpl= Test.testInsertTranscriptActivity(IbatisTranscriptActivityDaoImplTest.java:197)

         =       =20 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native = Method)

.
The procedure does run fine if = I change the=20 mode to "IN" but the values that I expect to be set into the input map = I=20 provide is being set as null. I dont know what has to be done. I am = using=20 Spring with Ibatis together and have an oracle database. Any help on = this is=20 appreciated.
 
 
Thanks and = Regards
Sundar=20 .

------_=_NextPart_001_01C86389.563A5640--