Are you telling us the whole story :-) ? Where is com.foo.MyFrameworkServlet?

This or something like it should work. I have trouble remembering the rules about slashes, so I would try removing the leading slash from /lib/MyServletJAR.jar in the war's manifest classpath.

thanks
david jencks

On Jan 31, 2007, at 7:52 AM, Tim Davidson wrote:

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.xml or 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.

Reply via email to