10 Replies Latest reply on Jun 27, 2014 2:21 PM by Praneshkumar Pandian

    Creating custom modules in JBoss 6.2.0 EAP throwing exception

    Praneshkumar Pandian Newbie

      Hello,

       

      I'm using JBoss 6.2.0 and trying to create a new custom module but throwing exceptions. Please correct me, the way I have created the custom module is correct? If there is any other way of doing it please let me know.

      I hope all system modules are automatically added to create dependency for my custom modules.

       

      1. Created a directory : mkdir -p JBoss_HOME/modules/com/mycompany/appl/main

      2. Placed all my 4 jars inside main dir

      3. Created module.xml under main dir.

       

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

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

          <resources>

              <resource-root path="devicetypeapi.jar"/>

              <resource-root path="deviceatlas-deviceapi-2.0.jar"/>

        <resource-root path="deviceatlas-common-1.0.jar"/>

              <resource-root path="deviceatlas-carrierapi-1.0.1.jar"/>

          </resources>

      </module>

       

      4. Created jboss-deployment-structure under WEB-INF & packed the war deployment file.

       

      <jboss-deployment-structure>

         <deployment>

            <dependencies>

               <module name="com.mycompany.appl.devicetypeapi"/>

               <module name="com.mycompany.appl.deviceatlas-deviceapi-2.0"/>

               <module name="com.mycompany.appl.deviceatlas-common-1.0"/>

               <module name="com.mycompany.appl.deviceatlas-carrierapi-1.0.1"/>

            </dependencies>

         </deployment>

      </jboss-deployment-structure>

       

      5. When I start the server & deploy my application, throwing exceptions, though deployment is successful.

       

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

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

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

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

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

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

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

      Caused by: org.jboss.modules.ModuleNotFoundException: com.mycompany.appl.devicetypeapi:main

              at org.jboss.modules.Module.addPaths(Module.java:1030) [jboss-modules.jar:1.3.0.Final-redhat-2]

              at org.jboss.modules.Module.link(Module.java:1386) [jboss-modules.jar:1.3.0.Final-redhat-2]

              at org.jboss.modules.Module.relinkIfNecessary(Module.java:1414) [jboss-modules.jar:1.3.0.Final-redhat-2]

              at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:242) [jboss-modules.jar:1.3.0.Final-redhat-2]

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

              ... 5 more

      13:29:30,858 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 26) JBAS018559: Deployed "devicetypeapi.war" (runtime-name : "devicetypeapi.war")

      13:29:30,873 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report

      JBAS014777:   Services which failed to start:      service jboss.module.service."deployment.devicetypeapi.war".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.devicetypeapi.war".main: JBAS018759: Failed to load module: deployment.devicetypeapi.war:main

      13:29:30,898 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:10090/management

      13:29:30,899 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:10090

      13:29:30,899 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14) started (with errors) in 7298ms - Started 139 of 199 services (1 services failed or missing dependencies, 58 services are passive or on-demand)

       

      Thanks,

      Pranesh