5 Replies Latest reply on Nov 9, 2011 7:04 AM by Radim Hanus

    Deployment issues with jbosscommonj-1.0.sar in Jboss AS 7.0.2

    viki jr Newbie

       

       

       

      I am trying to deploy jbosscommonj-1.0.sar on Jboss AS 7 and getting the below error. Please suggest to fix the parsing error.

       

      ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.deployment.unit."jbosscommonj-1.0.sar".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."jbosscommonj-1.0.sar".PARSE: Failed to process phase PARSE of deployment "jbosscommonj-1.0.sar"

      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]

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

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

      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]

      at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to parse service xml ["/C:/Jboss/jboss-as-7.0.2.Final/bin/content/jbosscommonj-1.0.sar/META-INF/jboss-service.xml"]

      at org.jboss.as.service.ServiceDeploymentParsingProcessor.deploy(ServiceDeploymentParsingProcessor.java:94)

      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]

      ... 5 more

      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[2,1]

      Message: Unexpected element 'server'

      at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:98) [staxmapper-1.0.0.Final.jar:1.0.0.Final]

      at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:59) [staxmapper-1.0.0.Final.jar:1.0.0.Final]

      at org.jboss.as.service.ServiceDeploymentParsingProcessor.deploy(ServiceDeploymentParsingProcessor.java:87)

      ... 6 more

       

      Snippet from jboss-service.xml:

       

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

      <server>

          <mbean code="net.sf.jbosscommonj.timermanager.TimerManagerService" name="net.sf.jbosscommonj.timermanager:service=TimerManagerService">

              <attribute name="JNDIName">java:timer/timer</attribute>

              <attribute name="MinThreads">15</attribute>

              <attribute name="MaxThreads">5</attribute>

              <attribute name="QueueLength">10</attribute>       

          </mbean>

          <mbean code="net.sf.jbosscommonj.workmanager.WorkManagerService" name="net.sf.jbosscommonj.workmanager:service=WorkManagerService">

              <attribute name="JNDIName">java:worker/worker</attribute>

              <attribute name="MinThreads">15</attribute>

              <attribute name="MaxThreads">5</attribute>

              <attribute name="QueueLength">10</attribute>

          </mbean>

      </server>

        • 1. Re: Deployment issues with jbosscommonj-1.0.sar in Jboss AS 7.0.2
          viki jr Newbie

          Found that jbosscommonj-1.0.sar can be deployed only in Jboss 5.1 and AS 7 does not support service archive. I would like to know if commonj TimerManager is supported in AS 7 and how its implemented.

          • 2. Re: Deployment issues with jbosscommonj-1.0.sar in Jboss AS 7.0.2
            jaikiran pai Master

            MBeans and .sar deployments are supported. See this http://community.jboss.org/message/628674#628674.

             

            There's already a JIRA to make it work without an explicit namespace https://issues.jboss.org/browse/AS7-1896

            • 3. Re: Deployment issues with jbosscommonj-1.0.sar in Jboss AS 7.0.2
              viki jr Newbie

              Thank you Jaikiran. I did explode the sar, updated jboss-service.xml and recreated sar file. While deploying the updated sar I am getting below error

               

              Caused by: java.lang.NoClassDefFoundError: org/jboss/system/ServiceMBean

               

              Do we have jbosscommonj-1.0.sar available with explicit namespace which can be deployed since the updated sar is not working.

              • 4. Re: Deployment issues with jbosscommonj-1.0.sar in Jboss AS 7.0.2
                viki jr Newbie

                Below is the full stack trace of the exception:

                 

                [org.jboss.modules] (MSC service thread 1-1) Failed to define class net.sf.jbosscommonj.timermanager.TimerManagerService in Module "deployment.jbosscommonj-1.0.sar:main" from Service Module Loader: java.lang.LinkageError: Failed to link net/sf/jbosscommonj/timermanager/TimerManagerServiceMBean (Module "deployment.jbosscommonj-1.0.sar:main" from Service Module Loader)

                    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.Module.loadModuleClass(Module.java:590) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]

                    at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_26]

                    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [:1.6.0_26]

                    at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [:1.6.0_26]

                    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [:1.6.0_26]

                    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.Module.loadModuleClass(Module.java:590) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]

                    at java.lang.Class.forName0(Native Method) [:1.6.0_26]

                    at java.lang.Class.forName(Class.java:247) [:1.6.0_26]

                    at org.jboss.as.service.ReflectionUtils.getClass(ReflectionUtils.java:100)

                    at org.jboss.as.service.ParsedServiceDeploymentProcessor.addServices(ParsedServiceDeploymentProcessor.java:111)

                    at org.jboss.as.service.ParsedServiceDeploymentProcessor.deploy(ParsedServiceDeploymentProcessor.java:102)

                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]

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

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

                    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]

                    at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]

                Caused by: java.lang.NoClassDefFoundError: org/jboss/system/ServiceMBean

                    at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_26]

                    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [:1.6.0_26]

                    at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [:1.6.0_26]

                    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [:1.6.0_26]

                    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397) [jboss-modules.jar:1.0.2.GA]

                    ... 33 more

                Caused by: java.lang.ClassNotFoundException: org.jboss.system.ServiceMBean from [Module "deployment.jbosscommonj-1.0.sar:main" from Service Module Loader]

                    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]

                    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]

                    ... 38 more

                 

                11:15:39,260 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."jbosscommonj-1.0.sar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."jbosscommonj-1.0.sar".INSTALL: Failed to process phase INSTALL of deployment "jbosscommonj-1.0.sar"

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

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]

                    at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]

                Caused by: java.lang.LinkageError: Failed to link net/sf/jbosscommonj/timermanager/TimerManagerServiceMBean (Module "deployment.jbosscommonj-1.0.sar:main" from Service Module Loader)

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

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

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

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

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

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

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

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

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

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

                    at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_26]

                    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [:1.6.0_26]

                    at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [:1.6.0_26]

                    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [:1.6.0_26]

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

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

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

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

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

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

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

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

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

                    at java.lang.Class.forName0(Native Method) [:1.6.0_26]

                    at java.lang.Class.forName(Class.java:247) [:1.6.0_26]

                    at org.jboss.as.service.ReflectionUtils.getClass(ReflectionUtils.java:100)

                    at org.jboss.as.service.ParsedServiceDeploymentProcessor.addServices(ParsedServiceDeploymentProcessor.java:111)

                    at org.jboss.as.service.ParsedServiceDeploymentProcessor.deploy(ParsedServiceDeploymentProcessor.java:102)

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

                    ... 5 more

                Caused by: java.lang.NoClassDefFoundError: org/jboss/system/ServiceMBean

                    at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_26]

                    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [:1.6.0_26]

                    at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [:1.6.0_26]

                    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [:1.6.0_26]

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

                    ... 33 more

                Caused by: java.lang.ClassNotFoundException: org.jboss.system.ServiceMBean from [Module "deployment.jbosscommonj-1.0.sar:main" from Service Module Loader]

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

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

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

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

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

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

                • 5. Re: Deployment issues with jbosscommonj-1.0.sar in Jboss AS 7.0.2
                  Radim Hanus Expert

                  Both ServiceMBean and ServiceMBeanSupport aren't supported yet see http://community.jboss.org/thread/167037 for details.