1 Reply Latest reply on Mar 18, 2013 2:50 AM by Nicklas Karlsson

    quartz module makes deployment fail

    Rusty Hamilton Newbie

      Hello.. I've been given the task of deploying an app to a JBoss AS 7 server; there was already an Ant build script for doing this, and it's worked for the most part.

       

      However, part of the application depends on Quartz, and JBoss appears unable to load that module for some reason; this causes deployment to fail. Granted, I have in fact seen http://stackoverflow.com/questions/6740924/how-to-enable-quartz-scheduling-in-jboss-as-7-0 but this is issue is different. As you can see from the stack trace below, I'm getting a 'Failed to add resource root' error, although the jar it's requesting is in the same directory as the module.xml file. What else could be causing this issue?

       

      {quote}

      17:43:53,972 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.module.service."(ear being deployed)".main: org.jboss.msc.service.StartException in service jboss.module.service."(ear being deployed)".main: Failed to load module: (ear being deployed):main

          at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

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

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

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]

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

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

      Caused by: org.jboss.modules.ModuleLoadException: Error loading module from /opt/jboss/modules/org/quartz/main/module.xml

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

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

          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.ModuleLoader.preloadExportedModule(ModuleLoader.java:233)

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

          at org.jboss.as.server.moduleservice.ServiceModuleLoader.preloadModule(ServiceModuleLoader.java:160) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

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

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

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

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

          at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

          ... 5 more

      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[3,49]

      Message: Failed to add resource root 'quartz-all-2.1.6.jar' at path 'quartz-all-2.1.6.jar'

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

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

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

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

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

          ... 19 more

      {quote}

       

      My module.xml is located in ($JBOSS_HOME)/modules/org/quartz/main, as does quartz-all-2.1.6.jar, and contains:

      {code:xml}

      <module xmlns="urn:jboss:module:1.1" name="org.quartz">

        <resources>

          <resource-root path="quartz-all-2.1.6.jar"/>

          <!-- Insert resources here -->

        </resources>

        <dependencies>

          <module name="org.slf4j"/>

          <module name="javax.api"/>

        </dependencies>

      </module>

      {code}