geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aman Nanner/MxI Technologies <>
Subject Re: Servlet fails to deploy
Date Thu, 01 Feb 2007 20:12:07 GMT
Is this supposed to work the same way when manipulating the Class-Path
entry of a Manifest file in an EJB JAR file, rather than a WAR?  It seems
that I'm unable to reference any libraries that I put in the root of the
EAR file.  I have to place the library JARS directly in the EJB module and
reference them there from the Manifest.  For example, this works for me:

  - META-INF/application.xml
  - META-INF/geronimo-application.xml
       - META-INF/lib/library.jar
       - META-INF/MANIFEST.MF: Class-Path: META-INF/lib/library.jar
       - META-INF/ejb-jar.xml
       - META-INF/openejb-jar.xml

but this does not:

  - META-INF/application.xml
  - META-INF/geronimo-application.xml
  + lib/library.jar
       - META-INF/MANIFEST.MF: Class-Path: ./lib/library.jar
       - META-INF/ejb-jar.xml
       - META-INF/openejb-jar.xml

"Tim Davidson" <> wrote on 02-01-2007 03:47:49 AM:

> hmmm taking your advice and moving the JAR to the root of the EAR
> and updating the manifest class-path accordingly fixed the problem.
> So this got me thinking and I tried it again, using a dot in front
> of the path (./lib/MyServeltJAR.jar) and it worked ok, this was a
> difficult one to spot!
> Thanks again,
> Tim.

> On 31/01/07, David Carew <> wrote:
> 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 <> 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.
>   - META-INF/application.xml
>   - META-INF/geronimo-application.xml
>   + lib/MyServletJAR.jar
>        -
>   + WAR
>        - META-INF/MANIFEST.MF: Class-Path: /lib/MyServletJAR.jar
>        - WEB-INF/web.xml: <servlet></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
> org.apache.geronimo.common.DeploymentException: Could not load
> servlet class
> at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.
> addGBeans(
> at org.apache.geronimo.tomcat.deployment.
> TomcatModuleBuilder$$FastClassByCGLIB$$6f85ec2c.invoke(<generated>)
> at net.sf.cglib.reflect.FastMethod.invoke(
> ...
> Caused by: java.lang.ClassNotFoundException:
> MyFrameworkServlet in classloader
> at org.apache.geronimo.kernel.config.MultiParentClassLoader.
> loadClass(
> 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.

* This message is intended only for the use of the individual or entity to which it is addressed,
and may contain information that is privileged, confidential and exempt from disclosure under
applicable law. Unless you are the addressee (or authorized to receive for the addressee),
you may not use, copy or disclose the message or any information contained in the message.
If you have received this message in error, please advise the sender by reply e-mail , and
delete the message, or call (collect) 001 613 747 4698. *

View raw message