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.