1

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

anto
  • 55
  • 1
  • 3

1 Answers1

1

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

geert3
  • 7,086
  • 1
  • 33
  • 49
  • Ok. A question about modules scope: my app.war can see all modules or just those I've explicitly declared in the war file jboss-deployment-structure.xml? – anto Sep 19 '14 at 09:34
  • hmm not sure. But even if it's not required, at least it's good practice to still declare it. – geert3 Sep 19 '14 at 13:27