4 Replies Latest reply on Dec 28, 2016 2:32 AM by Sundar S

    org.jboss.modules.ModuleLoadException: Error loading module from ..../main/module.xml

    Sundar S Newbie

      Hi every one,

       

      i am facing "ModuleLoadException" while deploying my WAR.

       

      my module.xml file is here..

      module.xml

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

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

          <dependencies>

              <module name="javax.api"/>

          </dependencies>

       

          <resources>

              <resource-root path="vaadin-calendar-2.0.0.jar"/>

              <resource-root path="vaadin-charts-1.1.3.jar"/>

              <resource-root path="vaadin-client-7.6.2.jar"/>

              <resource-root path="vaadin-client-compiled-7.6.2.jar"/>

              <resource-root path="vaadin-client-compiler-7.6.2.jar"/>

              <resource-root path="vaadin-client-compiler-deps-1.2.0.jar"/>

              <resource-root path="vaadin-lazyquerycontainer-2.1.16.jar"/>

              <resource-root path="vaadin-push-7.6.2.jar"/>

              <resource-root path="vaadin-sass-compiler-0.9.13.jar"/>

              <resource-root path="vaadin-server-7.6.2.jar"/>

              <resource-root path="vaadin-shared-7.6.2.jar"/>

              <resource-root path="vaadin-slf4j-jdk14-1.6.1.jar"/>

              <resource-root path="vaadin-themes-7.6.2.jar"/>

              <resource-root path="vaadin-widgets-7.6.2.jar"/>

          </resources>

       

       

          <dependencies>

              <!-- Insert dependencies here -->

          </dependencies>

      </module>

       

       

      My jboss-deployment-structure.xml is here and my jboss-deployment-structure.xml is placed in WEB-INF dir

       

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

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1"> 

          <deployment> 

              <dependencies> 

                    <module name="com.iii.ppp" />

              </dependencies> 

          </deployment> 

      </jboss-deployment-structure>

       

       

      Please help me........

        • 2. Re: org.jboss.modules.ModuleLoadException: Error loading module from ..../main/module.xml
          Sundar S Newbie

          Hi, This is my full exception

           

          Caused by: org.jboss.modules.ModuleLoadException: Error loading module from /home/user/jboss/modules/com/iii/ppp/main/module.xml

            at org.jboss.modules.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:292) [jboss-modules.jar:1.1.1.GA]

            at org.jboss.modules.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:242) [jboss-modules.jar:1.1.1.GA]

            at org.jboss.modules.LocalModuleLoader.parseModuleInfoFile(LocalModuleLoader.java:138) [jboss-modules.jar:1.1.1.GA]

            at org.jboss.modules.LocalModuleLoader.findModule(LocalModuleLoader.java:122) [jboss-modules.jar:1.1.1.GA]

            at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:275) [jboss-modules.jar:1.1.1.GA]

            at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:222) [jboss-modules.jar:1.1.1.GA]

            at org.jboss.modules.LocalModuleLoader.preloadModule(LocalModuleLoader.java:94) [jboss-modules.jar:1.1.1.GA]

            at org.jboss.modules.ModuleLoader.preloadExportedModule(ModuleLoader.java:233) [jboss-modules.jar:1.1.1.GA]

            at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:246) [jboss-modules.jar:1.1.1.GA]

            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) [jboss-modules.jar:1.1.1.GA]

            at org.jboss.modules.Module.link(Module.java:1181) [jboss-modules.jar:1.1.1.GA]

            at org.jboss.modules.Module.relinkIfNecessary(Module.java:1207) [jboss-modules.jar:1.1.1.GA]

            at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:208) [jboss-modules.jar:1.1.1.GA]

            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]:[24,19]

          Message: Unexpected content of type 'element start' named '{urn:jboss:module:1.1}dependencies'

            at org.jboss.modules.ModuleXmlParser.unexpectedContent(ModuleXmlParser.java:355) [jboss-modules.jar:1.1.1.GA]

            at org.jboss.modules.ModuleXmlParser.parseModuleContents(ModuleXmlParser.java:669) [jboss-modules.jar:1.1.1.GA]

            at org.jboss.modules.ModuleXmlParser.parseDocument(ModuleXmlParser.java:548) [jboss-modules.jar:1.1.1.GA]

            at org.jboss.modules.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:287) [jboss-modules.jar:1.1.1.GA]

           

           

           

          My module.xml File Path is "/home/user/jboss/modules/com/iii/ppp/main/module.xml".

           

          Please help me how can i fi

          • 3. Re: org.jboss.modules.ModuleLoadException: Error loading module from ..../main/module.xml
            jaikiran pai Master

            Sundar S wrote:

             

             

            my module.xml file is here..

            module.xml

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

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

            <dependencies>

            <module name="javax.api"/>

            </dependencies>

             

            <resources>

            <resource-root path="vaadin-calendar-2.0.0.jar"/>

            <resource-root path="vaadin-charts-1.1.3.jar"/>

            <resource-root path="vaadin-client-7.6.2.jar"/>

            <resource-root path="vaadin-client-compiled-7.6.2.jar"/>

            <resource-root path="vaadin-client-compiler-7.6.2.jar"/>

            <resource-root path="vaadin-client-compiler-deps-1.2.0.jar"/>

            <resource-root path="vaadin-lazyquerycontainer-2.1.16.jar"/>

            <resource-root path="vaadin-push-7.6.2.jar"/>

            <resource-root path="vaadin-sass-compiler-0.9.13.jar"/>

            <resource-root path="vaadin-server-7.6.2.jar"/>

            <resource-root path="vaadin-shared-7.6.2.jar"/>

            <resource-root path="vaadin-slf4j-jdk14-1.6.1.jar"/>

            <resource-root path="vaadin-themes-7.6.2.jar"/>

            <resource-root path="vaadin-widgets-7.6.2.jar"/>

            </resources>

             

             

            <dependencies>

            <!-- Insert dependencies here -->

            </dependencies>

            </module>

             

             

            The module.xml is incorrect. Notice that it has the dependencies section listed twice (once at the top and once at the end). That's what the exception is complaining about (as can be seen in the precise error message along with the line numbers):

            Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[24,19]

            Message: Unexpected content of type 'element start' named '{urn:jboss:module:1.1}dependencies'

             

            Fixing that module.xml should get you past this.

            • 4. Re: org.jboss.modules.ModuleLoadException: Error loading module from ..../main/module.xml
              Sundar S Newbie

              Thanks jaikiran, ModuleLoadException is clear.

               

              But now another issue is occurred that is "LinkageError"

               

               

              07:24:03,456 WARN  [org.jboss.modules] (MSC service thread 1-1) Failed to define class com.vaadin.server.communication.JSR356WebsocketInitializer in Module "com.iii.ppp:main" from local module loader @565d1ac3 (roots: /home/sundar/jboss/modules): java.lang.LinkageError: Failed to link com/vaadin/server/communication/JSR356WebsocketInitializer (Module "com.iii.ppp:main" from local module loader @565d1ac3 (roots: /home/sundar/jboss/modules))

                at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396)

                at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)

                at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)

                at org.jboss.modules.Module.loadModuleClass(Module.java:517)

                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_95]

                at java.lang.Class.forName(Class.java:278) [rt.jar:1.7.0_95]

                at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54)

                at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:63) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113)

                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.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_95]

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

                at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_95]

              Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener

                at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_95]

                at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_95]

                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0_95]

                at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)

                at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)

                ... 19 more

              Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContextListener from [Module "com.iii.ppp:main" from local module loader @565d1ac3 (roots: /home/sundar/jboss/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.performLoadClass(ConcurrentClassLoader.java:398)

                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                ... 24 more

               

               

              please help me anybody. how to fix it?