2 Replies Latest reply on Oct 26, 2012 8:26 AM by Tomaz Cerar

    Error while loading Infinispan JARs as a module in EAP6!!

    Ashish Tomar Newbie

      hello,

       

      I am trying to add infinispan 5.1.7.final jars as a module in EAP6 ( which currently doesn't have this version of infinispan) and these JArs are located in my jboss as in:

       

      ../EAP-Node1/Jboss-eap-6/modules/com/mycompany/sdk/infinispan/5.1.7.Final/

       

      and my module.xml for this looks like this :

       

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

      <module xmlns="urn:jboss:module:1.1" name="com.mycompany.sdk.infinispan" slot="5.1.7.Final">

          <resources>

              <resource-root path="infinispan-core-5.1.7.FINAL-redhat-1.jar"/>

                          <resource-root path="infinispan-client-hotrod-5.1.7.Final-redhat-1.jar"/>

          </resources>

          <dependencies>

              <module name="javax.api"/>

              <module name="javax.transaction.api"/>

              <module name="javax.xml.bind.api"/>

              <module name="net.jcip"/>

              <module name="org.apache.xerces" services="import"/>

              <module name="org.jboss.jandex"/>

              <module name="org.jboss.logging"/>

              <module name="org.jboss.marshalling"/>

              <module name="org.jboss.marshalling.river" services="import"/>

              <module name="org.jgroups"/>

          </dependencies>

      </module>

       

      i have one multi module project in which one module use these Jars as dependency through manifest file like this in their POM:

       

                  <build>

                               <plugins>

                                    <plugin>

                                              <groupId>org.apache.maven.plugins</groupId>

                                              <artifactId>maven-jar-plugin</artifactId>

                                              <configuration>

                                                        <archive>

                                                                  <manifestEntries>

                                                                            <Dependencies>com.mycompany.sdk.infinispan5.1.7.Final</Dependencies>

                                                                  </manifestEntries>

                                                        </archive>

                                              </configuration>

                                    </plugin>

                          </plugins>

                </build>

       

      And, i have a WAR test for this module in arquillian which includes this module while creating a test archive and for this test i am adding a MANIFEST.MF as a manifest resource in which i mention the dependency to those infinispan JARs like this:

      Dependencies: com.mycompany.sdk.infinispan:5.1.7.Final

       

       

      But now when i run this test i get following error:


      10:19:53,780 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.module.service."deployment.InfinispanCacheWARTest.war".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.InfinispanCacheWARTest.war".main: JBAS018759: Failed to load module: deployment.InfinispanCacheWARTest.war:main

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

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

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

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_04]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_04]

                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_04]

      Caused by: org.jboss.modules.ModuleNotFoundException: Module com.mycompany.sdk.infinispan:5.1.7.Final is not found in local module loader @f9a042 (roots: C:\Users\me\opt\EAP-Node1\jboss-eap-6\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.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]

                ... 5 more

       

       

      10:19:54,002 INFO  [org.jboss.as.server] (management-handler-thread - 3) JBAS015870: Deploy of deployment "InfinispanCacheWARTest.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.module.service.\"deployment.InfinispanCacheWARTest.war\".main" => "org.jboss.msc.service.StartException in service jboss.module.service.\"deployment.InfinispanCacheWARTest.war\".main: JBAS018759: Failed to load module: deployment.InfinispanCacheWARTest.war:main

          Caused by: org.jboss.modules.ModuleNotFoundException: Module com.mycompany.sdk.infinispan:5.1.7.Final is not found in local module loader @f9a042 (roots: C:\\Users\\me\\opt\\EAP-Node1\\jboss-eap-6\\modules)"},"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"InfinispanCacheWARTest.war\".POST_MODULE Missing[JBAS014861: <one or more transitive dependencies>]"]}

       

      any help or comments are deeply appreciated!!

        • 1. Re: Error while loading Infinispan JARs as a module in EAP6!!
          Ashish Tomar Newbie

          Apologies for previously shown exception, the path in my local environment was not correct,i fixed that but i what i wanted to ask about is this exception which i am getting while resolving the dependency to the infinispan JARs:

           

          11:47:20,141 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.module.service."deployment.InfinispanCacheWARTest.war".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.InfinispanCacheWARTest.war".main: JBAS018759: Failed to load module: deployment.InfinispanCacheWARTest.war:main

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

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

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

                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_04]

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_04]

                    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_04]

          Caused by: org.jboss.modules.ModuleLoadException: Error loading module from C:\Users\me\opt\EAP-Node1\jboss-eap-6\modules\com\mycompany\sdk\infinispan\5.1.7.Final\module.xml

                    at org.jboss.modules.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:293)

                    at org.jboss.modules.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:243)

                    at org.jboss.modules.LocalModuleLoader.parseModuleInfoFile(LocalModuleLoader.java:138)

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

                    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.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]

                    ... 5 more

          Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[4,73]

          Message: Failed to add resource root 'infinispan-core-5.1.7.FINAL-redhat-1.jar' at path 'infinispan-core-5.1.7.FINAL-redhat-1.jar'

                    at org.jboss.modules.ModuleXmlParser.parseResourceRoot(ModuleXmlParser.java:899)

                    at org.jboss.modules.ModuleXmlParser.parseResources(ModuleXmlParser.java:855)

                    at org.jboss.modules.ModuleXmlParser.parseModuleContents(ModuleXmlParser.java:677)

                    at org.jboss.modules.ModuleXmlParser.parseDocument(ModuleXmlParser.java:549)

                    at org.jboss.modules.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:288)

                    ... 16 more

           

           

          11:47:20,348 INFO  [org.jboss.as.server] (management-handler-thread - 3) JBAS015870: Deploy of deployment "InfinispanCacheWARTest.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.module.service.\"deployment.InfinispanCacheWARTest.war\".main" => "org.jboss.msc.service.StartException in service jboss.module.service.\"deployment.InfinispanCacheWARTest.war\".main: JBAS018759: Failed to load module: deployment.InfinispanCacheWARTest.war:main

              Caused by: org.jboss.modules.ModuleLoadException: Error loading module from C:\\Users\\me\\opt\\EAP-Node1\\jboss-eap-6\\modules\\com\\mycompany\\sdk\\infinispan\\5.1.7.Final\\module.xml

              Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[4,73]

          Message: Failed to add resource root 'infinispan-core-5.1.7.FINAL-redhat-1.jar' at path 'infinispan-core-5.1.7.FINAL-redhat-1.jar'"},"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"InfinispanCacheWARTest.war\".POST_MODULE Missing[JBAS014861: <one or more transitive dependencies>]"]}

          • 2. Re: Error while loading Infinispan JARs as a module in EAP6!!
            Tomaz Cerar Master

            hi,

             

            i dont know why you don't just repleace jars in org.infinispan.main module, where all you need to to is to copy new jars and fix paths in module.xml to new ones...

             

            but if you want to go this way sure. looks like you are missing infinispan-core-5.1.7.FINAL-redhat-1.jar in folder EAP-Node1/Jboss-eap-6/modules/com/mycompany/sdk/infinispan/5.1.7.Final/

            next to module.xml

             

             

            --

            tomaz