openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dinkar Rao (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-674) javaagent enhancer (PCEnhancerAgent) ignores persistence units after the first in persistence.xml
Date Wed, 06 Aug 2008 01:04:44 GMT
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


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.


Mime
View raw message