openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phill Moran" <>
Subject RE: How to debug object retrieveal in JPA?
Date Mon, 30 Apr 2007 22:18:09 GMT
Actually I am doing the clear, once I got rid of it the exception disappeared.
SO IMHO no bug


-----Original Message-----
From: [] On Behalf Of Craig Russell
Sent: April 30, 2007 5:08 PM
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.


Caused by: java.lang.NullPointerException
	at java.util.ArrayList.addAll(
	at ca.BidSpec.emall.user.Person.pcsetPhoneNumbers(
	at ca.BidSpec.emall.user.Person.pcClearFields(
	at ca.BidSpec.emall.user.Person.pcNewInstance(

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.

View raw message