anto
anto

Reputation: 65

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

Upvotes: 1

Views: 655

Answers (1)

geert3
geert3

Reputation: 7341

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

Upvotes: 1

Related Questions