[jboss-user] [EJB 3.0] - Re: Persisting POJO entities defined in a different jar

jaikiran do-not-reply at jboss.com
Mon Jul 21 09:42:09 EDT 2008

anonymous wrote : estore-1.0.ear
  | |---estore-common-1.0.jar

Your estore-common-1.0.jar is not declared as a module in the application.xml and also its not in the default classpath of the EAR.  

If you are using JBoss-4.2.x then create a lib folder at the root of the EAR and move the estore-common-1.0.jar to that folder:

  | estore-1.0.ear
  |  |
  |  |--- lib
  |  |	|
  |  |	|--- estore-common-1.0.jar

Or you can add a java module to the application.xml:

  | <?xml version="1.0" encoding="UTF-8"?>
  | <!DOCTYPE application PUBLIC
  | 	"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
  | 	"http://java.sun.com/dtd/application_1_3.dtd">
  | <application>
  |   <display-name>estore-app</display-name>
  |   <module>
  |       <java>estore-common-1.0.jar</java>
  |   </module>
  |   <module>
  |     <ejb>estore-server-1.0.jar</ejb>
  |   </module>
  | </application>

I would recommend the lib folder approach, since any jar in that folder will become available to the entire EAR.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4165648#4165648

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4165648

More information about the jboss-user mailing list