2 Replies Latest reply on Jul 3, 2014 6:02 AM by sanjmand

    How to make all jars available in Jboss eap 6.0 classpath

    sanjmand

      Hi,

       

      I am migrating an application from weblogic to jboss eap 6.0 and for this i want about 20-25 third party jars to be available in jboss classpath. I have used  jboss module configuration to make all the jars available in jboss class path, so that these jars will be accessed from the client jar file contained in different ear or war file.

      But,I am getting below exception when tried to deploy an appllication to check if the jar is loaded in class path or not.

       

      ######## Exception ##############

      17:29:26,837 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.module.service."deployment.testjarinclasspath.war".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.testjarinclasspath.war".main: JBAS018759: Failed to load module: deployment.testjarinclasspath.war:main

              at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:92) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]

              at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]

      Caused by: org.jboss.modules.ModuleNotFoundException: Module com.mymodule:main is not found in local module loader @4e17e4ca (roots: C:\HP-jboss-eap-6.0\modules)

              at org.jboss.modules.LocalModuleLoader.findModule(LocalModuleLoader.java:126)

              at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:275)

              at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:222)

              at org.jboss.modules.LocalModuleLoader.preloadModule(LocalModuleLoader.java:94)

              at org.jboss.modules.Module.addPaths(Module.java:851)

              at org.jboss.modules.Module.link(Module.java:1206)

              at org.jboss.modules.Module.relinkIfNecessary(Module.java:1235)

              at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:208)

              at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:71) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]

              ... 5 more

       

      17:29:27,068 INFO  [org.jboss.as.server] (HttpManagementService-threads - 1) JBAS015870: Deploy of deployment "testjarinclasspath.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.module.service.\"deployment.testjarinclasspath.war\".main" => "org.jboss.msc.service.StartException in service jboss.module.service.\"deployment.testjarinclasspath.war\".main: JBAS018759: Failed to load module: deployment.testjarinclasspath.war:main

          Caused by: org.jboss.modules.ModuleNotFoundException: Module com.mymodule:main is not found in local module loader @4e17e4ca (roots: C:\\HP-jboss-eap-6.0\\modules)"},"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"testjarinclasspath.war\".POST_MODULE Missing[JBAS014861: <one or more transitive dependencies>]"]}

      17:29:27,103 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment testjarinclasspath.war in 35ms

       

      ######################

       

       

       

      I have created a libs\entrust folder in the com\mymodule\main directory and copied all the jars in the entrust folder and my main.xml is in the com\mymodule\main directory.

       

      The content of main.xml is copied below.I have not included any dependency because i am not aware of which all jar is dependent on other jar or how these jars are invoked sequentially.

       

      <?xml version="1.0" encoding="UTF-8"?>

      <module xmlns="urn:jboss:module:1.1" name="com.mymodule">

         

          <resources>

                          <resource-root path="libs/entrust/entbase.jar"/>

              <resource-root path="libs/entrust/entcms.jar"/>

                                      <resource-root path="libs/entrust/entmisc.jar"/>

                                      <resource-root path="libs/entrust/entp10.jar"/>

                                      <resource-root path="libs/entrust/entp12.jar"/>

                                      <resource-root path="libs/entrust/entp7.jar"/>

                                      <resource-root path="libs/entrust/entserverlogin.jar"/>

                                      <resource-root path="libs/entrust/entsmimev3.jar"/>

                                      <resource-root path="libs/entrust/enttunnel.jar"/>

                                      <resource-root path="libs/entrust/entcertlist.jar"/>

                                      <resource-root path="libs/entrust/entjsse.jar"/>

                                      <resource-root path="libs/entrust/entnsext.jar"/>

                                      <resource-root path="libs/entrust/entp11.jar"/>

                                      <resource-root path="libs/entrust/entp5.jar"/>

                                      <resource-root path="libs/entrust/entroaming.jar"/>

                                      <resource-root path="libs/entrust/entsmime.jar"/>

                                      <resource-root path="libs/entrust/entssl.jar"/>

                                      <resource-root path="libs/entrust/entuser.jar"/>

                                      <resource-root path="libs/entrust/entbase.jar"/>

          </resources>

       

                      <dependencies />

      </module>

       

       

      I want the above module as a global module so , i have made the following entry in standalone.xml file.

       

      <subsystem xmlns="urn:jboss:domain:ee:1.1">

                  <ear-subdeployments-isolated>false</ear-subdeployments-isolated>

                  <global-modules>

                     <module name="com.mymodule" slot="main"/>

                  </global-modules>

                  <spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>

                  <jboss-descriptor-property-replacement>true</jboss-descriptor-property-replacement>

              </subsystem>

                                     

                                     

                                     

      Kindly correct me where i made mistake as i am getting "ModuleNotFoundException" in jboss console.

       

      Regards

      Sanjeev Kumar