Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 50741 invoked from network); 8 Jul 2009 15:55:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Jul 2009 15:55:08 -0000 Received: (qmail 76575 invoked by uid 500); 8 Jul 2009 15:55:17 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 76542 invoked by uid 500); 8 Jul 2009 15:55:17 -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 76534 invoked by uid 99); 8 Jul 2009 15:55:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jul 2009 15:55:17 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [85.214.89.56] (HELO h1273841.stratoserver.net) (85.214.89.56) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jul 2009 15:55:06 +0000 Received: (qmail 20400 invoked from network); 8 Jul 2009 18:04:38 +0200 Received: from f053214093.adsl.alicedsl.de (HELO insomnia) (78.53.214.93) by bar54.de with SMTP; 8 Jul 2009 18:04:38 +0200 From: "Benjamin Klatt" To: References: <24370405.post@talk.nabble.com> <43c99d630907071135t6c7a4d3ejf6633338ab6e9a94@mail.gmail.com> <24393125.post@talk.nabble.com> In-Reply-To: <24393125.post@talk.nabble.com> Subject: AW: String parameter problem Date: Wed, 8 Jul 2009 17:54:37 +0200 Message-ID: <006a01c9ffe4$66370d00$32a52700$@de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acn/4phScPbymhdqQR6MmFQ+WOmc1wAAYghQ Content-Language: de X-Virus-Checked: Checked by ClamAV on apache.org Hi cax, have you tried to execute the query directly on the database to ensure = there is a result for your query? br Benjamin -----Urspr=FCngliche Nachricht----- Von: Cax [mailto:cahyadihermanto@gmail.com]=20 Gesendet: Mittwoch, 8. Juli 2009 17:31 An: user-java@ibatis.apache.org Betreff: Re: String parameter problem Hi,i turn on Log4j,but i can't see what is the problem in the log = file..here is the result in the log file : 2009-07-08 21:59:12,422 DEBUG main = com.ibatis.common.jdbc.SimpleDataSource com.ibatis.common.logging.jakarta.JakartaCommonsLoggingImpl - Created connection 35293. 2009-07-08 21:59:12,438 DEBUG main java.sql.Connection com.ibatis.common.logging.jakarta.JakartaCommonsLoggingImpl - = {conn-100000} Connection 2009-07-08 21:59:12,438 DEBUG main java.sql.Connection com.ibatis.common.logging.jakarta.JakartaCommonsLoggingImpl - = {conn-100000} Preparing Statement: select PX_IR025_PAN as pan, =20 F9_IR025_CRN as CRN, FX_IR025_EMB_NAME as name, = FX_IR025_CRD_PGM as crdPgm, FX_IR025_UPD_UID as updId from IR025 where PX_IR025_PAN =3D ? =20 2009-07-08 21:59:12,703 DEBUG main java.sql.PreparedStatement com.ibatis.common.logging.jakarta.JakartaCommonsLoggingImpl - = {pstm-100001} Executing Statement: select PX_IR025_PAN as pan, =20 F9_IR025_CRN as CRN, FX_IR025_EMB_NAME as name, = FX_IR025_CRD_PGM as crdPgm, FX_IR025_UPD_UID as updId from IR025 where PX_IR025_PAN =3D ? =20 2009-07-08 21:59:12,703 DEBUG main java.sql.PreparedStatement com.ibatis.common.logging.jakarta.JakartaCommonsLoggingImpl - = {pstm-100001} Parameters: [1234567890123456] 2009-07-08 21:59:12,703 DEBUG main java.sql.PreparedStatement com.ibatis.common.logging.jakarta.JakartaCommonsLoggingImpl - = {pstm-100001} Types: [java.lang.String] 2009-07-08 21:59:12,734 DEBUG main java.sql.ResultSet com.ibatis.common.logging.jakarta.JakartaCommonsLoggingImpl - = {rset-100002} ResultSet 2009-07-08 22:08:43,805 ERROR main ibatis.com.mydomain.data.Main ibatis.com.mydomain.data.Main - java.lang.NullPointerException Andrey Rogov-2 wrote: >=20 > hi , > turn on Log4j and look at the sql statement, prepare, parameter and = query > result . >=20 >=20 >=20 > 2009/7/7 Cax >=20 >> >> hello, I got a problem in iBatis, i hope somebody could help me... >> i hit problem when i pass in a parameter which the data type is = string, >> and >> the field length in database is 19 char. But,it throws exception = because >> the >> returned object is null. and then i try to change the WHERE clause >> condition,to based on other field which the data type is number,and = it >> works... >> i want to know what is the problem,is the string value too long or = what? >> >> below is my code example : >> >> >> >> >> in java: >> >> Account acc =3D new Account(); >> >> acc.setpan("1234567890123456"); >> >> acc =3D (Account) sqlMapper.queryForObject("selectAccountById", acc); >> //(Note : return null) >> System.out.println(" " + acc.getname()); >> >> >> Thanks before for your help....:-) >> >> >> >> -- >> View this message in context: >> = http://www.nabble.com/String-parameter-problem-tp24370405p24370405.html >> Sent from the iBATIS - User - Java mailing list archive at = Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org >> For additional commands, e-mail: user-java-help@ibatis.apache.org >> >> >=20 >=20 --=20 View this message in context: http://www.nabble.com/String-parameter-problem-tp24370405p24393125.html Sent from the iBATIS - User - Java mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org For additional commands, e-mail: user-java-help@ibatis.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org For additional commands, e-mail: user-java-help@ibatis.apache.org