openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter" <kwsut...@gmail.com>
Subject Re: Bug in Enhancer?
Date Fri, 23 May 2008 13:35:29 GMT
Stephen,
>From what I can tell from your example, you are not intending to persist the
fieldList attribute, right?  I'm wondering if the PCEnhancer is getting
confused because this field is not marked as @Transient?  You don't specify
a getter method for fieldList.  Since your other annotations are on the
getter methods, you might need to define a getFieldList() method and then
mark it as @Transient.  As a quick test, you could try putting @Transient on
the attribute itself, but the JPA spec states that an application can not
mix the two types of annotations (field and property).

Not saying that this would be the final answer, but I'm wondering what your
results would be.

Thanks,
Kevin

On Thu, May 22, 2008 at 4:25 AM, Leake, Stephen <stephenleake@fairisaac.com>
wrote:

> Hi Patrick,
>
> I did include the exception with my original post but here is the
> relevant bit again:
>
>
>
> <openjpa-1.0.3-SNAPSHOT-r420667:636088M nonfatal general error>
> org.apache.openjpa.util.GeneralException: An error occurred while
> enhancing com.test.entity.Test. Exception message: null
>
>      at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:471)
>
>      at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4362)
>
>      at
> org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask.java:89)
>
>      at
> org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:172)
>
>      at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>
>      at org.apache.tools.ant.Task.perform(Task.java:364)
>
>      at org.apache.tools.ant.Target.execute(Target.java:341)
>
>      at org.apache.tools.ant.Target.performTasks(Target.java:369)
>
>      at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>
>      at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
>
>      at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecut
> or.java:40)
>
>      at
> org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTar
> gets(EclipseDefaultExecutor.java:32)
>
>      at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>
>      at
> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAnt
> Runner.java:423)
>
>      at
> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAn
> tRunner.java:137)
>
> Caused by: java.lang.NullPointerException
>
>      at
> org.apache.openjpa.enhance.PCEnhancer.fromBackingFieldName(PCEnhancer.ja
> va:3693)
>
>      at
> org.apache.openjpa.enhance.PCEnhancer.replaceAndValidateFieldAccess(PCEn
> hancer.java:859)
>
>      at
> org.apache.openjpa.enhance.PCEnhancer.replaceAndValidateFieldAccess(PCEn
> hancer.java:808)
>
>      at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:449)
>
>        ... 14 more
>
> Steve.
>
>
> >Hi,
> >
> >Can you post the exception that you're getting?
> >
> >-Patrick
> >
> >On May 19, 2008, at 6:25 AM, Leake, Stephen wrote:
> >
> >> If I have the following class the enhancer will enhance it correctly:
>
> >...
>
>
> This email and any files transmitted with it are confidential, proprietary
> and intended solely for the individual or entity to whom they are
> addressed.
> If you have received this email in error please delete it immediately.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message