I’m having trouble getting an external jar, specifically commons-logging.jar, to be deployed in the EJB JAR file for deployment. Let me explain:
I have 3 modules: A web project, an EJB Project and an Enterprise Application Project. I wish to use commons-logging.jar for logging in both the web and EJB modules. Using the Properties -> Java Build Path -> Libraries dialog within the web and EJB projects I added the commons-logging.jar to both using “Add External Jars…”
Deploying the EAR project results in the web.war file which contains the proper WEB-INF/lib/commons-logging.jar. The services.jar file, on the other hand, does not contain the commons-logging.jar file in it. As a result the deployment into the Oracle App Server fails because it can’t find the logging library used by the EJB classes.
I have been able to deploy an EAR file which contains the following structure:
commons-logging-1.0.4.jar
commons.jar
services.jar
web.war
META-INF/MANIFEST.MF
META-INF/application.xml
… but still Oracle barfs on deployment saying it can’t find the logging classes. It seems the solution is to add the commons-logging.jar file into the EJB services.jar file but I can’t seem to get it deployed that way.
Under Windows -> MyEclipse -> Web Project you can tell it to deploy dependent libraries into the lib directory… Is there something similar for EJB Projects? How can I setup Eclipse and/or MyEclipse to add the commons-logging.jar file in the EJB services.jar archive?
Thanks for your help,
– John