I have an enterprise application archive (.ear) containing at least one .war archive. The webapp references libraries in the root of the .ear archive through the META-INF/MANIFEST.MF Class-Path: reference. This .ear also contains an ejb that makes references to the common libraries using it's manifest file. The archive deploys and executes properly.
Now I unzip this archive into a .ear directory. The enterprise application deploys the webapp and the ejb, however, when accessing the webapp a failure occurs. The webapp cannot find the referenced libraries in the manifest file. I do not know if the ejb library references are working properly.
My work-around is to copy all of the .ear libraries into the WEB-INF/lib directory of the webapp during development. For production I package the enterprise application into a .ear archive and all works per the specification. Any other work-arounds?
It is hard to consider this a bug since the J2EE specs do not specify how an exploded archive should behave, but it would be nice if I could explode my archive into a directory and have it work the same as if it were archived.
A side note: Actually, the webapp successfully references ear libraries during loading (struts action is found), but after loading it does not reference the libraries. This phenomenon is over-detailed in
http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ File:
Manifest-Version: 1.0
Class-Path: standard.jar jstl.jar struts.jar commons-beanutils.jar commons-collections.jar commons-logging.jar commons-digester.jar xtags.jar i18n.jar commons-dbcp.jar commons-pool.jar commons-services.jar commons-validator.jar dom4j.jar
Directory Structure
.ear
--standard.jar
--jstl.jar
--...other jars
--myEjb.jar
--META-INF
----MANIFEST.MF (references libs from .ear root)
--myWebapp.war
--META-INF
----MANIFEST.MF (references libs from .ear root)
--web app resources...
--WEB-INF
----lib
------contains no libraries
This is for JBoss 3.0.3 and JBoss 3.0.2/Tomcat 4.0.4