I've done this but the utility jar was in the root of the EAR. I would suggest putting the utility jar in the root of the EAR file and then refer to it in the WAR files manifest using the jar files name (without any directory slashes).

On 1/31/07, Tim Davidson <trdavidson@gmail.com> wrote:

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.

  - 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,