You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by vmix <ar...@gmail.com> on 2012/08/01 00:28:28 UTC
tomEE with OpenJPA meta class problems
Hi,
I'm trying to get TomEE working with a default OpenJPA injected
EntityManager. Here's the error:
WARNING - Meta class "com.blah.jpa.UserAddress_" for entity class
com.blah.jpa.UserAddress can not be registered with following exception
"java.security.PrivilegedActionException: java.lang.ClassNotFoundException:
com.blah.jpa.UserAddress_"
I thought maybe this meant that the OpenJPA needed to be pre-enhanced by my
build script, which I believe I've done now but still get the same error.
Ideas?
Thanks
--
View this message in context: http://openejb.979440.n4.nabble.com/tomEE-with-OpenJPA-meta-class-problems-tp4656610.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: tomEE with OpenJPA meta class problems
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,
It is done here
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/openbooks/build.xml?view=markup
If you use maven check you generate and that it is compiled and included in
the artifact.
- Romain
Le 1 août 2012 00:28, "vmix" <ar...@gmail.com> a écrit :
> Hi,
>
> I'm trying to get TomEE working with a default OpenJPA injected
> EntityManager. Here's the error:
>
> WARNING - Meta class "com.blah.jpa.UserAddress_" for entity class
> com.blah.jpa.UserAddress can not be registered with following exception
> "java.security.PrivilegedActionException: java.lang.ClassNotFoundException:
> com.blah.jpa.UserAddress_"
>
> I thought maybe this meant that the OpenJPA needed to be pre-enhanced by my
> build script, which I believe I've done now but still get the same error.
>
> Ideas?
>
> Thanks
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/tomEE-with-OpenJPA-meta-class-problems-tp4656610.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Re: tomEE with OpenJPA meta class problems
Posted by vmix <ar...@gmail.com>.
Aah, thank you for this clarification -- I didn't really grok the distinction
between Meta vs Enhanced classes... that explains a lot. Now I realize
those underscore references (e.g. MyClass_) are referring to the Meta
classes, which aren't there because I never generated them.
So I found a maven task to generate the meta .java files, which I then
copied back into my project for normal compilation, followed by enhancement,
and then finally, OpenJpa code that works!
Thanks again for the very helpful tips.
--
View this message in context: http://openejb.979440.n4.nabble.com/tomEE-with-OpenJPA-meta-class-problems-tp4656610p4656633.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: tomEE with OpenJPA meta class problems
Posted by Romain Manni-Bucau <rm...@gmail.com>.
hmm,
meta classes and enhanced classes are different things.
Typically you should get more classes.
A way to do it is to generated meta classes then add them to maven
src/main/java. But we often generate them in generated-sources *before* the
compilation.
- Romain
2012/8/1 vmix <ar...@gmail.com>
> Thanks... I am indeed using maven, and I have confirmed that the class was
> enhanced. I see the added OpenJpa code in the actual .class file. But
> nonetheless I get the same error from TomEE.
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/tomEE-with-OpenJPA-meta-class-problems-tp4656610p4656616.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Re: tomEE with OpenJPA meta class problems
Posted by vmix <ar...@gmail.com>.
Thanks... I am indeed using maven, and I have confirmed that the class was
enhanced. I see the added OpenJpa code in the actual .class file. But
nonetheless I get the same error from TomEE.
--
View this message in context: http://openejb.979440.n4.nabble.com/tomEE-with-OpenJPA-meta-class-problems-tp4656610p4656616.html
Sent from the OpenEJB User mailing list archive at Nabble.com.