[ 
https://issues.apache.org/jira/browse/OPENJPA-674?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Catalina Wei closed OPENJPA-674.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.0
                   1.2.0
         Assignee: Catalina Wei

Fix checked in under r683075  for svn trunk and 1.2.x branch.

> javaagent enhancer (PCEnhancerAgent) ignores persistence units after the 
> first in persistence.xml
> -------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-674
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-674
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Dinkar Rao
>            Assignee: Catalina Wei
>             Fix For: 1.2.0, 1.3.0
>
>         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 server.
> 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.

Reply via email to