You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chaohua Wang <ch...@premierdata.com> on 2008/02/04 21:59:43 UTC

javaee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

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

 

 


Re: javaee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

Posted by David Smith <dn...@cornell.edu>.
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: javaee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

Posted by david delbecq <de...@oma.be>.
Chaohua Wang a écrit :
> 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
>   
Just read that specified section of specs and process appropriately to 
correct your jar files.

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