geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Davidson" <trdavid...@gmail.com>
Subject Re: Servlet fails to deploy
Date Thu, 01 Feb 2007 08:47:49 GMT
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 <dccarew@gmail.com> 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 <trdavidson@gmail.com> 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.MyFrameworkServletin 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.
> >
>
>

Mime
View raw message