openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
Subject Re: JDK 1.7 seems to be causing an issue with latest snapshot
Date Tue, 09 Jul 2013 02:00:52 GMT
Looks like the security classloader and the agent enhancer are defining the
same class (with the agent getting there first). Without any clue to which
classes are entities, the agent enhances everything it finds. Anecdotal
evidence suggests that it only takes one persistence unit without a list of
entities to cause the problem.

The logs will have something like this if that's the case:
65  test  INFO   [main] openjpa.Enhance - You have enabled runtime
enhancement, but have not specified the set of persistent classes.  OpenJPA
must look for metadata for every loaded class, which might increase class
load times significantly.

If you're getting this message the easiest workaround is to list your
entities in persistence.xml, or a mapping file. Failing that you can try a
system argument : -Dopenjpa.MetaDataFactory=Types=${list your classes here}
(but I didn't have much luck with this when I tried it).

Or, you could enhance as a build step. This
page<http://openjpa.apache.org/entity-enhancement.html>might help.
Chances are you've already read it, but the next reader might
not have the link.

To automagically resolve this we'd have to make some (significant?) changes
to the agent, and we'd need a JIRA issue, if one hasn't already been opened.

If you can, try listing your entities, or running the enhancer prior to
running your app (and skip the javaagent). If neither works, let us know
and hopefully we'll be able to help.
-Mike



On Mon, Jul 8, 2013 at 2:23 PM, garpinc <garpinc@yahoo.com> wrote:

> Hi.. Is anyone working on this? I'm just getting back to some work that's
> dependent on this working and unfortunately my previously working system
> broke because the overall platform changed to 1.7 JDK.
>
> Thanks
>
>
>
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/JDK-1-7-seems-to-be-causing-an-issue-with-latest-snapshot-tp7581417p7584362.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

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