Hello, I have a problem when trying to package a JAR file in an EAR file. In
short my EAR file has three modules; and EJB module, a JAR module and a WAR
module. The EJB module makes use of the JAR module. My POM is as follows;

...
<modules>
   <jarModule>
      <groupId>com.test.persistence</groupId>
      <artifactId>persistence</artifactId>
      <!-- <includeInApplicationXml>true</includeInApplicationXml> -->
   </jarModule>
   <ejbModule>
      <groupId>com.test.ejb</groupId>
      <artifactId>ejb</artifactId>
   </ejbModule>
   <webModule>
      <groupId>com.test.web</groupId>
      <artifactId>web</artifactId>
   </webModule>
</modules>
...

However when I deploy the application on Geronimo I get an error telling me
that an EJB cannot be deployed because of a class in the persistence jar
file (which is used from the EJB). The exact error is as follows;

-----
The application was not deployed.

The application was not deployed.
Could not fully load class: com.test.ejb.MyEjbBean
 due to:com/test/persistence/User
 in classLoader: 
org.apache.geronimo.kernel.classloader.temporaryclassloa...@cf0aa9b
java.lang.NoClassDefFoundError: Could not fully load class:
com.test.ejb.MyEjbBean
 due to:com/test/persistence/User
 in classLoader: 
org.apache.geronimo.kernel.classloader.temporaryclassloa...@cf0aa9b
-----

I checked the documentation and the only thing i could see realted is the
option includeInApplicationXml. However if I set this to true then I get the
following error;

-----
Module was not an application client: persistence-1.0-SNAPSHOT.jar
-----

Does anyone know how thtough maven I can package a JAR in an EAR file so
that this can be used by any other module within that EAR file?



-- 
View this message in context: 
http://maven.40175.n5.nabble.com/How-to-package-a-JAR-file-in-an-EAR-file-so-that-this-can-be-accessed-by-all-other-modules-ex-EJB-WA-tp3306790p3306790.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to