- This topic has 2 replies, 2 voices, and was last updated 20 years ago by Riyad Kalla.
-
AuthorPosts
-
jaanus80MemberHello!
When adding Hibernate capabilities to an EJB project the EAR application that contains the EJB module can not be successfully deployed to application server because the app server can not find Hibernate libraries.
How to solve the problem? How to add the necessary libraries to the module so that app server finds them? By hand? How?
I do not want to add the libraries to the some common library directory of the application server.
Regards
Jaanus
jaanus80MemberOK, figured it out …
One way to do this is to modify the file META-INF/MANIFEST.MF of EJB module to contain Class-Path entry with all the names of the necessary (Hibernate) library files.
My manifest now looks like this:
Manifest-Version: 1.0
Class-Path: META-INF/hibernate2.jar META-INF/commons-logging-1.0.4.jar
META-INF/jaas.jar META-INF/jgroups-2.2.7.jar
META-INF/swarmcache-1.0rc2.jar
META-INF/ant-optional-1.5.3.jar META-INF/commons-pool-1.2.jar
META-INF/jboss-cache.jar META-INF/jta.jar META-INF/xalan-2.4.0.jar
META-INF/c3p0-0.8.4.5.jar META-INF/concurrent-1.3.3.jar
META-INF/jboss-common.jar
META-INF/junit-3.8.1.jar META-INF/xerces-2.4.0.jar
META-INF/cglib-full-2.0.2.jar
META-INF/connector.jar META-INF/jboss-jmx.jar META-INF/log4j-1.2.8.jar
META-INF/xml-apis.jar META-INF/commons-collections-2.1.1.jar
META-INF/dom4j-1.4.jar
META-INF/jboss-system.jar META-INF/odmg-3.0.jar
META-INF/commons-dbcp-1.2.1.jar
META-INF/ehcache-0.9.jar META-INF/jcs-1.0-dev.jar
META-INF/oscache-2.0.jar
META-INF/commons-lang-1.0.1.jar META-INF/ant-1.5.3.jar
META-INF/jdbc2_0-stdext.jar
META-INF/proxool-0.8.3.jarPretty isn’t it 😛 (btw, I Copied the libraries to the META-INF directory of the EAR).
I would say it is quite annoyng thing to do. It might be automated by MyEclipse…
Jaanus
Riyad KallaMemberJaanus,
IIRC these JARs should actually be added to the Root of the EAR project but updating the manifest is the right way to do it… although my EAP/EJB knowledge is very minimal. -
AuthorPosts