From open-jpa-dev-return-3907-apmail-incubator-open-jpa-dev-archive=incubator.apache.org@incubator.apache.org Tue May 01 05:55:36 2007 Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 97062 invoked from network); 1 May 2007 05:55:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 May 2007 05:55:35 -0000 Received: (qmail 37304 invoked by uid 500); 1 May 2007 05:55:42 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 37162 invoked by uid 500); 1 May 2007 05:55:41 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 37153 invoked by uid 99); 1 May 2007 05:55:41 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Apr 2007 22:55:41 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of plinskey@gmail.com designates 64.233.166.183 as permitted sender) Received: from [64.233.166.183] (HELO py-out-1112.google.com) (64.233.166.183) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Apr 2007 22:55:33 -0700 Received: by py-out-1112.google.com with SMTP id p76so1545041pyb for ; Mon, 30 Apr 2007 22:55:12 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=XXa7b5A4jhHsJILouKqxAcxw2w/gi5RbNf1z6WksFSTZWWY5Iu+C5QyZ0MFIrqNXFs1yNjEqRcoA6wB1pMHpMFvIBrllERiKY7mKgwehqiLASXu8tT/CIejxQHgGhW0z54SgH+mSCGXDgiDuDT9SoRk+u6Z/U4jcXZI+C7fjyuQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Un83XtS1BMOSItckczwuc/RJmqmq+3JtKLSOJRRBUu+1Csipz5DcGPKTHQxyoJMnWIpkPca1VMNqFG0Rp130fXjItAgxi2SQe7LWfTkTE/eiY7n91mjeJjMzWyK8cYbybgE4ZZqpMeKrq0qIT4nkSvswKpZJCtUtWOlIt9C9HVc= Received: by 10.35.82.16 with SMTP id j16mr12768855pyl.1177998912437; Mon, 30 Apr 2007 22:55:12 -0700 (PDT) Received: by 10.35.31.16 with HTTP; Mon, 30 Apr 2007 22:55:12 -0700 (PDT) Message-ID: <7262f25e0704302255m680715cbga4739087bbd9e085@mail.gmail.com> Date: Mon, 30 Apr 2007 22:55:12 -0700 From: "Patrick Linskey" To: open-jpa-dev@incubator.apache.org Subject: Re: How to debug object retrieveal in JPA? In-Reply-To: <001701c78b75$6f8db1a0$6601a8c0@tyan2400> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <001701c78b75$6f8db1a0$6601a8c0@tyan2400> X-Virus-Checked: Checked by ClamAV on apache.org > Actually I am doing the clear, once I got rid of it the exception disappeared. > SO IMHO no bug Good to hear, but I think that we could still do some work to make this easier to debug, at the least. And I'm still concerned about how you could ever get a list of exceptions back from a query execution. -Patrick On 4/30/07, Phill Moran wrote: > Actually I am doing the clear, once I got rid of it the exception disappeared. > SO IMHO no bug > > Phill > > -----Original Message----- > From: papajdo@gmail.com [mailto:papajdo@gmail.com] On Behalf Of Craig Russell > Sent: April 30, 2007 5:08 PM > To: open-jpa-dev@incubator.apache.org > Subject: Re: How to debug object retrieveal in JPA? > > IMHO, this is a bug in the generated code for pcNewInstance. > > I don't understand why the pcNewInstance should ever call pcClearFields. It just > got finished creating a new instance, and it knows that all fields have been set > to their Java default values. > [That's why we require the user to specify a no-args constructor, so the > implementation doesn't have to initialize anything.] I don't think that calling > pcClearFields is warranted during this life cycle phase. > > Craig > > Caused by: java.lang.NullPointerException > at java.util.ArrayList.addAll(ArrayList.java:472) > at ca.BidSpec.emall.user.Person.pcsetPhoneNumbers(Person.java:727) > at ca.BidSpec.emall.user.Person.pcClearFields(Person.java) > at ca.BidSpec.emall.user.Person.pcNewInstance(Person.java) > at > org.apache.openjpa.enhance.PCRegistry.newInstance(PCRegistry.java:121) > > > I had read this and assumed that it was an OpenJPA-generated method, but if so, > there shouldn't be a line number. Did you reverse-compile your classes at some > point and change the synthetic interception methods? > > That is the original method with a new name. As the documentation states, the > getters and setters used in property access may appear with a "pc" prefix in > stack traces under OpenJPA. > > -- Patrick Linskey 202 669 5907