geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Davidson" <trdavid...@gmail.com>
Subject Servlet fails to deploy
Date Wed, 31 Jan 2007 15:52:27 GMT
Hi,

I am having a problem with the servlet classpath for my EAR file which
successfully deploys on GlassFish and JBoss. I have a Servlet, MyServlet
which is in a JAR, MyServeltJAR.jar, the jar is referenced in the Class-Path
attribute of the WAR files MANIFEST file, and the servlet is referenced in
web.xml ie.

EAR
  - META-INF/application.xml
  - META-INF/geronimo-application.xml
  + lib/MyServletJAR.jar
       - com.foo.MyServelt.class
  + WAR
       - META-INF/MANIFEST.MF: Class-Path: /lib/MyServletJAR.jar
       - WEB-INF/web.xml: <servlet>com.foo.MyServlet</servlet>
       - WEB-INF/geronimo-web.xml

but Geronimo fails to deply the EAR as it cannot find the Servlet class:


Could not load servlet class com.foo.MyServlet
org.apache.geronimo.common.DeploymentException: Could not load servlet class
com.foo.MyServlet
at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(
TomcatModuleBuilder.java:386)
at
org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder$$FastClassByCGLIB$$6f85ec2c.invoke
(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
...

Caused by: java.lang.ClassNotFoundException: com.foo.MyFrameworkServlet in
classloader default/myapp_myapp.war/1170243138828/car
at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(
MultiParentClassLoader.java:298)
at java.lang.ClassLoader.loadClass(Unknown Source)
...

Do I need to put a reference to MyServletJAR.jar in geronimo-application.xmlor
geronimo-web.xml and if so how do i do that? Or does MyServletJAR.jar need
to contain something else to tell geronimo about the servlet?

Many thanks,

Tim.

Mime
View raw message