geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: EAR fails to deploy library JARs
Date Mon, 29 Jan 2007 17:11:01 GMT
Your application.xml is claiming that dom4j.jar is an application  
client jar.  However from the name and your email subject I'd suspect  
that it's the normal dom4j jar that you'd like to get in the  
classloader of your application.  To do this in a portable way you  
need to (in j2ee 1.4) include the jar in the manifest classpath of  
the module(s) that you intend to use it in, presumably the  
MyProject.war.  (In javaee5 there's a lib directory in an ear).   
There's also a geronimo specific way to do this by putting the  
library jar directly in the geronimo repository and listing it as a  
dependency in a geronimo plan for your app.

I have no explanation for why the other servers let you deploy with  
this application.xml: with the new annotation stuff in javaee5  
perhaps they don't check whether its a plausible application client  
until you try to use it?

david jencks

On Jan 29, 2007, at 8:57 AM, Tim Davidson wrote:

> I am a newbie to Geronimo, I have an EAR file which I have
> successfully managed to deploy to JBoss and Glassfish, I am now trying
> to deploy it to Geronimo however when it deploys it fails saying
> Deployment failed:
> -----------------
> Module was not an application client: dom4j.jar
> org.apache.geronimo.common.DeploymentException: Module was not an
> application client: dom4j.jar
>        at  
> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.addModules 
> (
>        at  
> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getEarPlan 
> (
> -----------------
> my application.xml is as follows:
> -----------------
> <?xml version="1.0" encoding="UTF-8"?>
> <application xmlns=""
>              xmlns:xsi=""
>              xsi:schemaLocation="
>      "
>              version="1.4">
>        <display-name>MyProject</display-name>
>        <module>
>                <web>
>                        <web-uri>MyProject.war</web-uri>
>                        <context-root>/MyProject</context-root>
>                </web>
>        </module>
>        <module>
>                <java>dom4j.jar</java>
>        </module>
> .....
> -----------------
> whatever jar file I reference in the <java> element it says the same
> thing, the contents of my EAR file are as follows:
>   - META-INF/application.xml
>   - dom4j.jar
>   - MyProject.war
> dom4j.jar is a third party library required for my application, why am
> I getting this error? I have debugged this and it appears that if the
> <module> is type <java> then AppClientModuleBuilder is used and this
> requires the jar to contain an application-client.xml, otherwise it
> will fail, is this a bug or how are you supposed to specify library
> jars contained with an EAR?
> many thanks
> Tim.

View raw message