You're trying to mix a j2ee library with tomcat and that just doesn't work. Consider javaee.jar to be "everything including the kichen sink" -- lots and lots of packages all in one jar file. Some of the things that javaee.jar provides are already provided in tomcat and you can't have two of the same class in the classloader hierarchy. If your target container is tomcat, drop the javaee.jar from your project then add back in stuff that's missing using individual package implementations. Google is your friend and you should be able to find jars to replace all the missing functionality.

--David

Chaohua Wang wrote:
Hi Folks,

I am new to tomcat.
Currently I am learning spring-struts-jpa-ajax stuff. And deployed to
apache-tomcat-5.5.23.
(http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.html)

When I deployed war to tomcat, I got the following error:

------------------------------------------

INFO:
validateJarFile(C:\sumacadmin\out\exploded\strutsajaxWeb\WEB-INF\lib\jav
aee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2.
Offending class: javax/servlet/Servlet.class

SEVERE: Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating
bean with name
'org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProces
sor' defined in ServletContext resource
[/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested
exception is java.lang.NoClassDefFoundError:
javax/persistence/EntityManagerFactory

Caused by: java.lang.NoClassDefFoundError:
javax/persistence/EntityManagerFactory

javax/persistence/EntityManagerFactory is in javaee.jar file. How can I
fix this issue? Please help. Thank you very much !

Chaohua




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to