openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Nordahl <>
Subject Re: Exceptions in my deployed environment
Date Wed, 22 Aug 2012 20:08:15 GMT
To update this thread, the way I got this working when building the 
project in Netbeans 7.2 was to add OpenJPA as a persistence provider by 
using the jar files contained in the OpenJPA bin release. Netbeans then 
automatically adds the correct <provider> entry in the persistence.xml 
file for OpenJPA.  Under additional compiler options in the project 
settings I added -Aopenjpa.metamodel=true

The meta classes were then compiled to 
<project-home>/build/generated-sources/ap-source-output and were 
included in the /dist war file for deployment.

On 08/17/2012 03:55 PM, Romain Manni-Bucau wrote:
> Did you generate jpa meta classes?
> Le 17 août 2012 22:14, "David Nordahl" <> a écrit :
>> I'm having trouble making TomEE happy on my deployed server and I'm not
>> sure what is different from my dev environment.  Basically I have my EJB
>> class files included in a jar in the lib folder of TomEE as well as in my
>> deployed WAR web app.
>> When EJBs are invoked, I get exceptions like:
>> ClassCastException: cannot convert class A to class A.
>> I also get exceptions about duplicate NamedQuery's.
>> So I assume duplicate instances of class files present and TomEE is not
>> able to sort this out for some reason.  So if I remove the EJB classes
>> contained in the /lib folder jar of my class files, I get:
>> WARNING: Meta class "**Customer_" for entity class
>> can not be registered with following
>> exception "**PrivilegedActionException: java.lang.**ClassNotFoundException:
>> Aug 17, 2012 12:39:26 PM null
>> Any advice regarding what I might be doing wrong ?  2-1 seems to equal 0
>> here :-)

View raw message