openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dinkar Rao (JIRA)" <>
Subject [jira] Updated: (OPENJPA-674) javaagent enhancer (PCEnhancerAgent) ignores persistence units after the first in persistence.xml
Date Wed, 06 Aug 2008 01:10:46 GMT


Dinkar Rao updated OPENJPA-674:

    Attachment: PCEnhancerAgent.patch

Patch follows a strategy similar to the invocation for PCEnhancer. The list of fully qualified
PUs (filtered by arguments to the javaagent, or unfiltered if no arguments are specified)
 is obtained and looped over. The code to do runtime enhancement per individual PU is unchanged.

> javaagent enhancer (PCEnhancerAgent) ignores persistence units after the first in persistence.xml
> -------------------------------------------------------------------------------------------------
>                 Key: OPENJPA-674
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Dinkar Rao
>         Attachments: PCEnhancerAgent.patch
> A persistence.xml file has multiple PUs defined. A program makes use of a PU which is
NOT the first PU in the list. The classes are not enhanced at build time, but are enhanced
at runtime via the javaagent. No anchor arguments are passed to the javaagent.
> Because PCEnhancerAgent ignores PUs following the first, OpenJPA tries to use an appropriate
runtime enhancing strategy for a class, but is not always be able to. The program gets this
error back:
> Error Message: [Error while processing persistent field <blah>
> Error details: The accessor for field getTheAddress in type <blah> is private or
package-visible. OpenJPA requires accessors in unenhanced instances to be public or protected.
If you do not want to add such an accessor, you must run the OpenJPA enhancer after compilation,
or deploy to an environment that supports deploy-time enhancement, such as a Java EE 5 application
> The root problem is that the javaagent choses only the first  PU's classes for enhancement,
and ignores the remaining PUs from persistence.xml. A workaround is to explicity specify the
PU referenced by the program as an argument to the javaagent.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message