For help with installation, bugs reports or feature requests, please head over to our new forums.
	
Genuitec Community on GitHub
- This topic has 4 replies, 2 voices, and was last updated 20 years ago by Riyad Kalla. 
- 
		AuthorPosts
- 
		
			
				
 jnikolaiMemberI’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, 
 – JohnOctober 20, 2005 at 8:27 am #239791
 Riyad KallaMemberJohn, 
 The problem is that there is not a comparable deployment setting for EJB projects to deploy external JARs, so you will need to drop the logging JAR into the EJB project for it to be deployed as well. I believe optionally you should be able to place this single jar in the root of your EAR, and both projects will have access to it.October 20, 2005 at 10:41 am #239808
 jnikolaiMemberI finally got it working. The user guide came in handy: 
 http://myeclipseide.com/enterpriseworkbench/help/index.jsp. Specifically the MyEclipse Application Developer Guide -> Getting Started -> Enterprise Application Project -> Advanced Features (Section 9).The problem was that my EJB and enterprise module properties were foobar from when I was trying to tweak them. After stepping through the Advanced Feature section and setting the properties correctly, the EAR file was deployed correctly into oc4j… The trick is getting the MANIFEST.MF Class-Path property set properly. Thanks for your help! October 20, 2005 at 10:43 am #239810
 jnikolaiMemberA classic case of RTFM 🙄 October 20, 2005 at 12:15 pm #239821
 Riyad KallaMemberThank you for double checking the doc and posting here, this will be very helpful to others. 
- 
		AuthorPosts

