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?
thanks
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
(EARConfigBuilder.java:771)
at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getEarPlan
(EARConfigBuilder.java:362)
-----------------
my application.xml is as follows:
-----------------
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
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:
EAR
- META-INF/MANIFEST.MF
- 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.