简体   繁体   中英

JBoss 5.1: jar in server lib with dependency

My war needs access to abc.jar. And abc.jar is dependent on xyz.jar. In JBoss 4.3, I was able to just put abc.jar and xyz.jar in my server lib. But in 5.1, I get a class not found exception that indicates that abc.jar can not find xyz.jar. Is there some new war configuration which I am missing to ensure that abc.jar can find xyz.jar?

Usually, this kind of deployment is done using EAR files, with a classpath entry in the MANIFEST.MF. I believe that a WAR should also work, provided both JARs are in WEB-INF/lib and their MANIFEST.MF is properly configured. Putting both jars in the lib probably worked before, but it was never the appropriate solution for this scenario. Your deployments should only go into deploy directory, in the form of a deployment archive.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM