Hey all,

I'm trying to get persistence to work in tomee, but I just seem to fail.
When I try to compile a very simple project (I'm using netbeans), I get the
following stacktrace:


Some lines from build-impl.xml:



I just don't seem to understand where the error comes from, since I'm pretty
sure there is a javax.persistence.spi.PersistenceUnitInfo class in
javaee-api-6.0.4-tomcat.jar, javax.persistence-2.0.3.jar and
ejb3-persistence.jar. So at first, I thought I had to many times the same
class (interface), so I removed javax.persistence and ejb3-persistence from
$TOMCAT/lib. Same result... I removed the hibernate-related jars as well,
since I don't expect to use hibernate and I wanted to remove possible
interference or something, and if I will use them, I always can add them.

Some project files (the ones I think that are important, the error doesn't
seem wicket-related, so I don't mind these classes, but it's just a very
basic test application I used to get cdi to work - which luckily did work
out after some time. The webapp is really nothing fancy, I'm not even using
the persistence class):

web.xml



context.xml

(I'm using cdi inside wicket framework, hence the resource)

persistence.xml


item.java


I tried to add eclipselink jars to my project lib and to /opt/tomcat/lib as
well. Both give the same compile error. Not adding the eclipslink jars
doesn't help either... I added them to the tomcat/tomee lib-directory:


beans.xml (needed this one for cdi)



Jars in /opt/tomcat/lib.


System setup:



Any help pointing me in the right direction? (On forums, it's pointed out
that the same class may be present in different jars in case of
NoClassDefFoundError, and/or that I should add the eclipslink jars in the
lib-directory of tomcat/tomee. I seem the have another issue, since it is at
compile-time and there is a ClassNotFoundException).

Thx, Kurt



--
View this message in context: 
http://openejb.979440.n4.nabble.com/tomee-eclipselink-NoClassDefFoundError-ClassNotFoundException-tp4658870.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to