Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 58896 invoked from network); 23 Mar 2010 02:14:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Mar 2010 02:14:56 -0000 Received: (qmail 31598 invoked by uid 500); 23 Mar 2010 02:14:55 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 31578 invoked by uid 500); 23 Mar 2010 02:14:55 -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 31571 invoked by uid 99); 23 Mar 2010 02:14:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Mar 2010 02:14:55 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yuqianguo@gmail.com designates 74.125.83.181 as permitted sender) Received: from [74.125.83.181] (HELO mail-pv0-f181.google.com) (74.125.83.181) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Mar 2010 02:14:48 +0000 Received: by pvg16 with SMTP id 16so3147767pvg.12 for ; Mon, 22 Mar 2010 19:14:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=k8FI5Yg37hpGSZweHPSY6GxnF/1LMXcKP1eXOPHJNvE=; b=xGHBEuEMJkMPH9xqoTQE6JoNDAy0rwEic1NJ2yR0LQabLBiW/WkMXhUgHcmhO2bDvJ ciIvGwkmiV3xrNnPLCsrfVQj3h6wTUmDjt+zZngEcJjeEBSi7TkX/3d3G5lSHM1mTgDr 8a6qbGbnCE40hTTsxMGOei60mDHARWuPUX/CM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=pPeDxNw8Fw7za7+5IQ3Ac0q0v2U3ScH9cbgwByHrUo4NYjDl9pcytnoMsry1k05rwD FElFs3beUMB3mLSVZNEgML7dJ1b0QWcE7S/w+Kez0zFBUsPX0sa9gEd/ARdRDjM8RGXn kZONH/rcsB3HeZzCc7VbUfLfMklUiVjQ3ZkgE= MIME-Version: 1.0 Received: by 10.140.57.7 with SMTP id f7mr7272885rva.201.1269310468166; Mon, 22 Mar 2010 19:14:28 -0700 (PDT) In-Reply-To: <8bbd2311003221909i5a40fa95h823139f46033984c@mail.gmail.com> References: <8bbd2311003221909i5a40fa95h823139f46033984c@mail.gmail.com> Date: Tue, 23 Mar 2010 10:14:28 +0800 Message-ID: <8bbd2311003221914k54d85a83k51bc315048464de4@mail.gmail.com> Subject: Re: db2 -302 error From: joson yu To: user-java@ibatis.apache.org Content-Type: multipart/alternative; boundary=001636b2b1549096a504826e5fa0 --001636b2b1549096a504826e5fa0 Content-Type: text/plain; charset=ISO-8859-1 ps:in the sql the parameter should passed in with String that is longger than 30. 2010/3/23 joson yu > there is an error happend in my situation.and want to know is there anyone > else meet this problem. > i use ibatis2. the database is used db2. > sql: select [columns] from tables where column1 = ''. > and the column1 is varchar type and it's length is 30. > the sql is execute fine in the db2 client. but when i use ibatis to execute > it .it throw exception ,blow is all exception info. > > > > > > > org.springframework.dao.DataIntegrityViolationException: SqlMapClient > operation; SQL []; > --- The error occurred in > com/hcss/fy/business/resource/ccr/model/HCSS_CCR_INFO_SqlMap.xml. > --- The error occurred while applying a parameter map. > --- Check the load_inheritor_baseinfo-InlineParameterMap. > --- Check the statement (query failed). > --- Cause: com.ibm.db2.jcc.a.jm: DB2 SQL Error: SQLCODE=-302, > SQLSTATE=22001, SQLERRMC=null, DRIVER=3.50.151; nested exception is > com.ibatis.common.jdbc.exception.NestedSQLException: > --- The error occurred in > com/hcss/fy/business/resource/ccr/model/HCSS_CCR_INFO_SqlMap.xml. > --- The error occurred while applying a parameter map. > --- Check the load_inheritor_baseinfo-InlineParameterMap. > --- Check the statement (query failed). > --- Cause: com.ibm.db2.jcc.a.jm: DB2 SQL Error: SQLCODE=-302, > SQLSTATE=22001, SQLERRMC=null, DRIVER=3.50.151 > at > org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:114) > at > org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322) > at > org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:212) > at > org.springframework.orm.ibatis.SqlMapClientTemplate.queryForObject(SqlMapClientTemplate.java:271) > at > com.hcss.fy.business.resource.ccr.dao.impl.InheritorDaoImpl.loadInheritor(InheritorDaoImpl.java:48) > at > com.hcss.fy.business.resource.ccr.dao.InheritorDaoTest.loadInheritor(InheritorDaoTest.java:57) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.springframework.test.context.junit4.SpringTestMethod.invoke(SpringTestMethod.java:160) > at > org.springframework.test.context.junit4.SpringMethodRoadie.runTestMethod(SpringMethodRoadie.java:233) > at > org.springframework.test.context.junit4.SpringMethodRoadie$RunBeforesThenTestThenAfters.run(SpringMethodRoadie.java:333) > at > org.springframework.test.context.junit4.SpringMethodRoadie.runWithRepetitions(SpringMethodRoadie.java:217) > at > org.springframework.test.context.junit4.SpringMethodRoadie.runTest(SpringMethodRoadie.java:197) > at > org.springframework.test.context.junit4.SpringMethodRoadie.run(SpringMethodRoadie.java:143) > at > org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:160) > at > org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:59) > at > org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:52) > at > org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34) > at > org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44) > --001636b2b1549096a504826e5fa0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable ps:in the sql the parameter should passed in with String=A0 that is longger= than 30.

2010/3/23 joson yu <yuqianguo@gmail.com>= ;
there is an error= happend in my situation.and want to know is there anyone else meet this pr= oblem.
i use=A0 ibatis2.=A0 the database is used=A0 db2.=A0
sql: select [colum= ns] from=A0 tables where column1 =3D ''.
and the column1 is varc= har type and it's length is 30.
the sql is execute fine in the db2 client. but when i use ibatis to execute= it .it throw exception ,blow is all exception info.





org.springframework.dao.DataIntegrityViolationException: SqlMapClient = operation; SQL [];=A0=A0
--- The error occurred in com/hcss/fy/business/resource/ccr/model/HCSS_CCR_= INFO_SqlMap.xml.=A0
--- The error occurred while applying a parameter m= ap.=A0
--- Check the load_inheritor_baseinfo-InlineParameterMap.=A0 --- Check the statement (query failed).=A0
--- Cause: com.ib= m.db2.jcc.a.jm: DB2 SQL Error: SQLCODE=3D-302, SQLSTATE=3D22001, SQLERR= MC=3Dnull, DRIVER=3D3.50.151; nested exception is com.ibatis.common.jdbc.ex= ception.NestedSQLException:=A0=A0
--- The error occurred in com/hcss/fy/business/resource/ccr/model/HCSS_CCR_= INFO_SqlMap.xml.=A0
--- The error occurred while applying a parameter m= ap.=A0
--- Check the load_inheritor_baseinfo-InlineParameterMap.=A0 --- Check the statement (query failed).=A0
--- Cause: com.ib= m.db2.jcc.a.jm: DB2 SQL Error: SQLCODE=3D-302, SQLSTATE=3D22001, SQLERR= MC=3Dnull, DRIVER=3D3.50.151
=A0=A0=A0 at org.springframework.jdbc.suppo= rt.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.= java:114)
=A0=A0=A0 at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTrans= lator.translate(SQLErrorCodeSQLExceptionTranslator.java:322)
=A0=A0=A0 a= t org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientT= emplate.java:212)
=A0=A0=A0 at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForOb= ject(SqlMapClientTemplate.java:271)
=A0=A0=A0 at com.hcss.fy.business.re= source.ccr.dao.impl.InheritorDaoImpl.loadInheritor(InheritorDaoImpl.java:48= )
=A0=A0=A0 at com.hcss.fy.business.resource.ccr.dao.InheritorDaoTest.lo= adInheritor(InheritorDaoTest.java:57)
=A0=A0=A0 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)=A0=A0=A0 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces= sorImpl.java:39)
=A0=A0=A0 at sun.reflect.DelegatingMethodAccessorImpl.i= nvoke(DelegatingMethodAccessorImpl.java:25)
=A0=A0=A0 at java.lang.reflect.Method.invoke(Method.java:597)
=A0=A0=A0 = at org.springframework.test.context.junit4.SpringTestMethod.invoke(SpringTe= stMethod.java:160)
=A0=A0=A0 at org.springframework.test.context.junit4.= SpringMethodRoadie.runTestMethod(SpringMethodRoadie.java:233)
=A0=A0=A0 at org.springframework.test.context.junit4.SpringMethodRoadie$Run= BeforesThenTestThenAfters.run(SpringMethodRoadie.java:333)
=A0=A0=A0 at = org.springframework.test.context.junit4.SpringMethodRoadie.runWithRepetitio= ns(SpringMethodRoadie.java:217)
=A0=A0=A0 at org.springframework.test.context.junit4.SpringMethodRoadie.run= Test(SpringMethodRoadie.java:197)
=A0=A0=A0 at org.springframework.test.= context.junit4.SpringMethodRoadie.run(SpringMethodRoadie.java:143)
=A0= =A0=A0 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.i= nvokeTestMethod(SpringJUnit4ClassRunner.java:160)
=A0=A0=A0 at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4= ClassRunner.java:59)
=A0=A0=A0 at org.junit.internal.runners.JUnit4Class= Runner$1.run(JUnit4ClassRunner.java:52)
=A0=A0=A0 at org.junit.internal.= runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
=A0=A0=A0 at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadi= e.java:44)

--001636b2b1549096a504826e5fa0--