Return-Path: Mailing-List: contact ibatis-user-java-help@incubator.apache.org; run by ezmlm Delivered-To: mailing list ibatis-user-java@incubator.apache.org Received: (qmail 10067 invoked by uid 99); 3 Jan 2005 15:58:25 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of clinton.begin@gmail.com designates 64.233.184.193 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.193) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 03 Jan 2005 07:57:29 -0800 Received: by wproxy.gmail.com with SMTP id 69so86423wra for ; Mon, 03 Jan 2005 07:57:14 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=ZoiuRfR/8Vg6cJoCrC43viLPSZ8mp6CBzOcDCgS5rfq7cuVaRh1dPd74a+DF9zKdtRWmrAxHfqs0Wnl69GB2GNTBhixefBG/MpEyOelopIRkjUMytU0/SdoupMuO1hVSvRROW89wYFzLVNexygu6Cjd3SqF6efTvP67TdZ513hw= Received: by 10.54.40.41 with SMTP id n41mr521713wrn; Mon, 03 Jan 2005 07:57:13 -0800 (PST) Received: by 10.54.33.38 with HTTP; Mon, 3 Jan 2005 07:57:13 -0800 (PST) Message-ID: <16178eb10501030757676df2e4@mail.gmail.com> Date: Mon, 3 Jan 2005 08:57:13 -0700 From: Clinton Begin Reply-To: cbegin@ibatis.com To: earmellin@ateikon.com Subject: Re: Exception using complex properties Cc: ibatis-user-java@incubator.apache.org In-Reply-To: <41D91542.7070502@ateikon.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <41D14D30.9010701@ateikon.com> <16178eb10412280759188774@mail.gmail.com> <41D18914.2000309@ateikon.com> <16178eb104122808487079518f@mail.gmail.com> <41D19521.40309@ateikon.com> <16178eb1041230192165c9730f@mail.gmail.com> <41D91542.7070502@ateikon.com> X-Virus-Checked: Checked I hate to say this, but the root of this exception does not seem to be coming from iBATIS. The root cause seems to be coming from inside the bean setter, or perhaps an interceptor (poxy/enhancer) between the ibatis call and the real bean setter. Could I suggest that you trace through using the iBATIS source and the Spring source? I'll write a unit test to verify that this works on my end. Cheers, Clinton On Mon, 03 Jan 2005 10:49:54 +0100, Emiliano Armellin wrote: > Clinton Begin ha scritto: > Could you send a stack trace? this is the stack trace: > > 2004-12-28 12:28:49,890 WARN > [org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator] - > fallback translator> > 2004-12-28 12:28:49,900 INFO > [org.springframework.jdbc.support.SQLStateSQLExceptionTranslator] - > [ > --- The error occurred in > com/ateikon/internet/bepsstore/dao/ibatis/maps/Product.xml. > --- The error occurred while applying a result map. > --- Check the Product.searchProductResult. > --- The error happened while setting a property on the result object. > --- Cause: com.ibatis.common.exception.NestedRuntimeException: Error > setting properties of 'Sinto cd MP3 NO memory stick'. Cause: > java.lang.NullPointerException > Caused by: java.lang.NullPointerException]; SQL was [] for task > [SqlMapClient operation]> > 2004-12-28 12:28:49,920 DEBUG > [org.springframework.transaction.support.TransactionSynchronizationManager] > - [org.springframework.jdbc.datasource.ConnectionHolder@1262f7c] for key > [org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy@158aac4] > bound to thread [http-8080-Processor25]> > 2004-12-28 12:28:49,930 DEBUG > [org.springframework.transaction.interceptor.RuleBasedTransactionAttribute] > - org.springframework.jdbc.UncategorizedSQLException: (SqlMapClient > operation): encountered SQLException [ > --- The error occurred in > com/ateikon/internet/bepsstore/dao/ibatis/maps/Product.xml. > --- The error occurred while applying a result map. > --- Check the Product.searchProductResult. > --- The error happened while setting a property on the result object. > --- Cause: com.ibatis.common.exception.NestedRuntimeException: Error > setting properties of 'Sinto cd MP3 NO memory stick'. Cause: > java.lang.NullPointerException > Caused by: java.lang.NullPointerException]; nested exception is > com.ibatis.common.jdbc.exception.NestedSQLException: > --- The error occurred in > com/ateikon/internet/bepsstore/dao/ibatis/maps/Product.xml. > --- The error occurred while applying a result map. > --- Check the Product.searchProductResult. > --- The error happened while setting a property on the result object. > --- Cause: com.ibatis.common.exception.NestedRuntimeException: Error > setting properties of 'Sinto cd MP3 NO memory stick'. Cause: > java.lang.NullPointerException > Caused by: java.lang.NullPointerException> > 2004-12-28 12:28:49,950 DEBUG > [org.springframework.transaction.interceptor.RuleBasedTransactionAttribute] > - > 2004-12-28 12:28:49,960 DEBUG > [org.springframework.transaction.interceptor.RuleBasedTransactionAttribute] > - > 2004-12-28 12:28:49,960 DEBUG > [org.springframework.transaction.interceptor.TransactionInterceptor] - > [com.ateikon.internet.bepsstore.domain.logic.BepsStoreFacade] due to > throwable [org.springframework.jdbc.UncategorizedSQLException: (SqlMapClient > operation): encountered SQLException [ > > in Product.xml I've got a resultMap with this: > > > select="checkKitCompRif" nullValue="0"/> > > where cdrifart is a String and the column field value is sometimes null and > gives the exception (I don't know why it writes Error setting properties of > 'Sinto cd MP3 NO memory stick' it seems a wrong message, there are no > exceptions writing this properties without property="countKitCompRif" > mapping) > > checkKitCompRif is simply a select count and countKitCompRif an int value > > DB: Oracle 8.1.7 > > hope it helps > > > > > -- > > Emiliano Armellin > > W_ www.ateikon.com > > @_ earmellin@ateikon.com > > T_ > +39 0422 452101 > >