Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 36432 invoked from network); 14 Aug 2006 15:38:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Aug 2006 15:38:28 -0000 Received: (qmail 79636 invoked by uid 500); 14 Aug 2006 15:38:27 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 79501 invoked by uid 500); 14 Aug 2006 15:38:26 -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 79490 invoked by uid 99); 14 Aug 2006 15:38:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Aug 2006 08:38:26 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of larry.meadors@gmail.com designates 64.233.182.187 as permitted sender) Received: from [64.233.182.187] (HELO nf-out-0910.google.com) (64.233.182.187) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Aug 2006 08:38:24 -0700 Received: by nf-out-0910.google.com with SMTP id x30so1832914nfb for ; Mon, 14 Aug 2006 08:38:03 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=TIMjj01Tvab92teQ7mPiwT+PqIZI7EwTlUXoBmdLACZRBd3TYrtdLvyiiON75aBc1yjbn9v/zmr1wZKCdDnA8cQSvJveB83h7A6AuW0xFJHB4PJDWC17ZOHkREbyHM4Wt0gjsHG+VSfh6C9J+AR9migVaw7/hYonBvWNxoA3bfs= Received: by 10.78.156.6 with SMTP id d6mr3293135hue; Mon, 14 Aug 2006 08:38:02 -0700 (PDT) Received: by 10.78.149.14 with HTTP; Mon, 14 Aug 2006 08:38:02 -0700 (PDT) Message-ID: Date: Mon, 14 Aug 2006 09:38:02 -0600 From: "Larry Meadors" Reply-To: lmeadors@apache.org Sender: larry.meadors@gmail.com To: user-java@ibatis.apache.org Subject: Re: Exception while setting properties In-Reply-To: <20060814131809.GA5448@office.redwerk.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_13000_10091357.1155569882731" References: <20060814131809.GA5448@office.redwerk.com> X-Google-Sender-Auth: 6d68b48c78b91349 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_13000_10091357.1155569882731 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline The simplest solution is for you to make the setters for the properties on com.project.Entity.Task not throw NPEs. ;-) It looks like most of the places where we are setting properties are reporting the property that causes the erros, but some are not - for example, the CGLIB version (EnhancedPropertyAccessPlan) does not. Feel free to submit a patch. Larry On 8/14/06, Eugeny N Dzhurinsky wrote: > > Would it be a better idea to explain exceptions like NullPointerException > when > setting some property and inform which method on the business object was > executed? > > Because I don't see any help of: > > ERROR com.project.Builder.DBTaskBuilder - > com.ibatis.common.jdbc.exception.NestedSQLException: > --- The error occurred in ibatis/task.xml. > --- The error occurred while applying a result map. > --- Check the loadTask-AutoResultMap. > --- The error happened while setting a property on the result object. > --- Cause: com.ibatis.common.exception.NestedRuntimeException: Error > setting properties of 'com.project.Entity.Task@ce2187'. Cause: > java.lang.NullPointerException > Caused by: java.lang.NullPointerException > Caused by: com.ibatis.common.exception.NestedRuntimeException: Error > setting properties of 'com.project.Entity.Task@ce2187'. Cause: > java.lang.NullPointerException > Caused by: java.lang.NullPointerException > > Is there any way to get what exactly caused that weird error?! > > -- > Eugene N Dzhurinsky > ------=_Part_13000_10091357.1155569882731 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline The simplest solution is for you to make the setters for the properties on com.project.Entity.Task not throw NPEs. ;-)

It looks like most of the places where we are setting properties are reporting the property that causes the erros, but some are not - for example, the CGLIB version (EnhancedPropertyAccessPlan) does not.

Feel free to submit a patch.

Larry


On 8/14/06, Eugeny N Dzhurinsky <bofh@redwerk.com> wrote:
Would it be a better idea to explain exceptions like NullPointerException when
setting some property and inform which method on the business object was executed?

Because I don't see any help of:

ERROR com.project.Builder.DBTaskBuilder  - com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in ibatis/task.xml.
--- The error occurred while applying a result map.
--- Check the loadTask-AutoResultMap.
--- The error happened while setting a property on the result object.
--- Cause: com.ibatis.common.exception.NestedRuntimeException: Error setting properties of 'com.project.Entity.Task@ce2187 '.  Cause: java.lang.NullPointerException
Caused by: java.lang.NullPointerException
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error setting properties of 'com.project.Entity.Task@ce2187'.  Cause: java.lang.NullPointerException
Caused by: java.lang.NullPointerException

Is there any way to get what exactly caused that weird error?!

--
Eugene N Dzhurinsky

------=_Part_13000_10091357.1155569882731--