简体   繁体   中英

jar as jboss module: dependencies

I have a question about JBoss modules dependencies vs war dependencies. I have an app.war ; its webinf/lib directory contains a myLib.jar only . In this configuration everything works fine.

Now I have to move mylib.jar outside the war, so I put it into a JBoss module and added it to module.xml; I also added it to the deployment-structure.xml file in the war. In this new configuration my app.war finds succesfully the external myLib.jar but now myLib.jar cannot find its dependencies anymore . Specifically it doesn't find rowset.jar as I get this exception:

java.lang.NoClassDefFoundError: com/sun/rowset/CachedRowSetImpl

Why can't myLib.jar see all the libs it used to see when it was deployed inside the war? Do I have to create a JBoss module with myLib dependencies?

Thanks

modules must have their own dependencies explicitly declared in the modules.xml . A Module cannot access jars that are part of a deployment.

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