Just keep the shared JARs at the SAR level, you should not need to use manifest files at all. The default behavior is to share all libraries.
it doesn't seem to work, did i get it right? i added all the jars (that hibernate depends on, plus hibernate) into the root of the ear. i also added my own jars (common code, persistent classes), but if i don't add the Class-Path manifest entry then my ejb deployment fails too.
so i add everything to the ear root, add manifest fo the ejb jar, everything works except the sar deploy fails with a (hibernate) calss not found exception.
(i have no tag anywhere, just started to play with it)
adding all these jars to the default/lib dir solves all problem, but i would like to have a standalone ear.
and i also had some strange behaviour: adding only _SOME_ of the jars to the default/lib that hibernate depends on resulted in this:
2003-07-11 15:18:11,730 WARN [org.jboss.system.ServiceController] Problem starting servi>
note that the thread is deep in the hibernate classes, and sais that a hibernate class is not found?! problem is solved if i add *.jar from the hibernate lib home to the default/lib dir. (that is i added some jars hibernate was depending on)
i searched the entire server for another copy of hibernate2.jar, there was only one. it's way too strange for me...
The order of deployment within the deploy dir is -"sar", "service.xml", "rar", "jar", "war", "wsr", "ear", "zip".
So ur Hibernate files(sars) are loaded before the other dependent jar files and it throws that exception as it doesnt load the jar yet(at that point!!). If you put the files in the default/lib, those are deployed before the deploy dir is even scanned. So if ur sars have a dependency of the jar files, that should take care of the exception.
Correct me if im wrong here!! I also started playing with these dependencies lately ;-)
thanks for the order, it's new info for me.
now i just have to look up how to make my sar dependent on a jar file. this j2ee seems to be done so that they can sell a zillion books... :)
You can use the jboss-service.xml for ur sar to create the "depends" clause. Once you deployed ur jar file, you should find the object name of it in the jndiview of the jmx-console. Give that as a depends clause argument in the jboss-service.xml for ur sar.
I have seen some thread here that talks about how to set up hibernate(not sure if its here or the hibernate web site). That should give you a good starting point.
I had the same problem (minus the sar issue) and was able to resolve it with entries in the application.xml file that look like:
The jars are in the root of the EAR file.
to application.xml solved my problem, and works even for my .sar. seems like .jars are deployed before .sar's...
thanks for all the help!
for which version did it worked?
It doesn't work for 2.4.3. I have the same problem, but I must solve it with v.2.4.3