jar as jboss module: dependencies

a 夏天 提交于 2019-12-24 12:47:23

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/25913946/jar-as-jboss-module-dependencies

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!