I reference a jar file from JBoss 7.1 module according to the instructions provided in a stackoverflow question here. I have used this jar in JBoss 5.x, 6.x without any issue. However, when I try to deploy a war file in JBoss 7.1 which references the above jar, it gives me the following error:
15:59:19,220 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host]. [/Max_client]] (MSC service thread 1-2) StandardWrapper.Throwable: java.lang
NoClassDefFoundError: org/xml/sax/SAXException
at com.systinet.wasp.webservice.ServiceClientImpl.lookup(ServiceClientImpl.java:556) [wasp.jar:]
at com.systinet.wasp.webservice.ServiceClientImpl.createProxy(ServiceClientImpl.java:437) [wasp.jar:]
at org.systinet.wasp.webservice.Registry.lookup(Registry.java:168) [wasp.jar:]
at MyServlet.init(MyServlet.java:103) at javax.servlet.GenericServlet.init(GenericServlet.java:242) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Fi
al]
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3655) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3873) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_35]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_35]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_35]
Caused by: java.lang.ClassNotFoundException: org.xml.sax.SAXException from [Module "commons.wasp:main" from local module loader @2adb1d4 (roots: c:\jboss-as-7.1.1
Final\modules)]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
... 15 more
I'm very new to this new module concept in JBoss 7. Any idea what is the issue here?
Thank you!
Details on what I tried to do:
I want to be able to make this dependency jar available globally. So what I did was created a folder structure modules/common_libs/test/main and placed the required jar in it. Then created the module descriptor module.xml:
<module xmlns="urn:jboss:module:1.1" name="common_libs.test">
<resources>
<resource-root path="test.jar"/>
</resources>
</module>
Then in the application from which I need to access this jar, I added in the MANIFEST.MF:
Dependencies: common_libs.test
The application is a war file and I deployed it under the deployment folder, and created a .war.dodeploy file. I get this exception when I start the JBoss server.
Any idea, anyone?
Thanks!