Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-299

Missing dependency causes XmlPullParserException

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: 1.0.0.Alpha8
    • Fix Version/s: core_1.0.0.CR3
    • Component/s: core
    • Labels:
      None
    • Steps to Reproduce:
      Hide
      1. Create a WAR project with only org.wildfly.swarm:undertow dependency and no project parent,
      2. Perform mvn install (note: com.sun.xml.bind.external:rngom:2.2.11.jbossorg-1 is not automatically downloaded, if you have it in your local repo it must be deleted),
      3. Run via org.wildfly.swarm.Swarm.
      Show
      Create a WAR project with only org.wildfly.swarm:undertow dependency and no project parent, Perform mvn install (note: com.sun.xml.bind.external:rngom:2.2.11.jbossorg-1 is not automatically downloaded, if you have it in your local repo it must be deleted), Run via org.wildfly.swarm.Swarm .

      Description

      Although Maven install can successfully complete if runtime dependency is missing a confusing exception is thrown. In this case the artefact
      com.sun.xml.bind.external:rngom:2.2.11.jbossorg-1 is not available due to the Maven repo repository.jboss.org not being available within my company network.

      StackTrace

      13:07:23,241 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("parallel-extension-add") failed - address: ([]): java.lang.RuntimeException: WFLYCTL0079: Failed initializing module org.jboss.as.weld
      	at org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:115)
      	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:890)
      	at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:659)
      	at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:370)
      	at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1344)
      	at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:459)
      	at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:387)
      	at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:349)
      	at org.jboss.as.server.ServerService.boot(ServerService.java:392)
      	at org.jboss.as.server.ServerService.boot(ServerService.java:365)
      	at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:299)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: WFLYCTL0311: Failed to load Extension module org.jboss.as.weld
      	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
      	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
      	at org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:107)
      	... 11 more
      Caused by: java.lang.RuntimeException: WFLYCTL0311: Failed to load Extension module org.jboss.as.weld
      	at org.jboss.as.controller.extension.ExtensionAddHandler.initializeExtension(ExtensionAddHandler.java:143)
      	at org.jboss.as.controller.extension.ExtensionAddHandler.initializeExtension(ExtensionAddHandler.java:104)
      	at org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:144)
      	at org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:127)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
      Caused by: org.jboss.modules.ModuleLoadException: Error loading module from modules/com/sun/xml/bind/main/module.xml
      	at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:228)
      	at org.wildfly.swarm.bootstrap.modules.BootstrapClasspathModuleFinder.findModule(BootstrapClasspathModuleFinder.java:58)
      	at org.jboss.modules.ModuleLoader.findModule(ModuleLoader.java:439)
      	at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:342)
      	at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:289)
      	at org.jboss.modules.Module.addExportedPaths(Module.java:1229)
      	at org.jboss.modules.Module.addPaths(Module.java:1121)
      	at org.jboss.modules.Module.link(Module.java:1448)
      	at org.jboss.modules.Module.relinkIfNecessary(Module.java:1476)
      	at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:225)
      	at org.jboss.modules.Module.loadServiceFromCallerModuleLoader(Module.java:405)
      	at org.jboss.as.controller.extension.ExtensionAddHandler.initializeExtension(ExtensionAddHandler.java:120)
      	... 8 more
      Caused by: org.jboss.modules.xml.XmlPullParserException: Failed to resolve artifact 'com.sun.xml.bind.external:rngom:2.2.11.jbossorg-1' (position: END_TAG seen ...rtifact name="com.sun.xml.bind.external:rngom:2.2.11.jbossorg-1"/>... @12:73) 
      	at org.jboss.modules.xml.ModuleXmlParser.parseArtifact(ModuleXmlParser.java:838)
      	at org.jboss.modules.xml.ModuleXmlParser.parseResources(ModuleXmlParser.java:739)
      	at org.jboss.modules.xml.ModuleXmlParser.parseModuleContents(ModuleXmlParser.java:535)
      	at org.jboss.modules.xml.ModuleXmlParser.parseDocument(ModuleXmlParser.java:340)
      	at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:226)
      	... 19 more
      

      I feel the error handling could be improved to state the missing dependency. This would be a common issue for those who corporate network doesn't allow direct access to JBoss repos.

      Apologies for not giving a code example.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dansiviter Daniel Siviter
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: