6 Replies Latest reply on Jul 20, 2011 6:13 PM by calduser

    Jboss(6) Scheduler deploy issues on linux server,works on Windows

    calduser

      Hi

      We are using jboss 6 as Application server.

      I have a scheduler, that should run every 5 minutes to do some work related to database. Scheduler class(PollingThread) is with my ear file. and i have defined scheduler-service.xml inside meta-inf folder.

      here is my folder structure.

       

      SSLNEar.ear

      - META-INF

           - application.xml

           - scheduler-service.xml

      - SalesSelection

           - css

           - html

           - js

           - jsp

           - WEB-INF

                -classes

                -lib

                     - SalesSelection.jar

                          - com.callidus.ssln.server.util.PollingThread

                -spring-servlet.xml

                -web.xml

       

      Here is my scheduler-service.xml

       

      <mbean code="org.jboss.varia.scheduler.Scheduler"

                name=":service=Scheduler">

            <attribute name="StartAtStartup">true</attribute>

            <attribute name="SchedulableClass">com.callidus.ssln.server.util.PollingThread</attribute>

            <attribute name="SchedulableArguments">Polling,12345</attribute>

            <attribute name="SchedulableArgumentTypes">java.lang.String,int</attribute>

            <attribute name="InitialStartDate">NOW</attribute>

            <attribute name="SchedulePeriod">300000</attribute>

            <attribute name="InitialRepetitions">-1</attribute>

            <attribute name="FixedRate">true</attribute>   

            <depends>

                  <mbean code="javax.management.timer.Timer" name="jboss:service=Timer"/>

            </depends>     

         </mbean>

       

      This deploys and works fine in windows OS, but is giving NullPointer exception and can not find Polling Thread in linux server.

       

       

      Here is the exception while deploying it in Linux box.

       

      05:34:48,171 ERROR [AbstractKernelController] Error installing to Instantiated: name=:service=Scheduler state=Described mode=Manual requiredState=Configured

      1. java.lang.NullPointerException

              at EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap.hash(ConcurrentReaderHashMap.java:299)

              at EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap.get(ConcurrentReaderHashMap.java:411)

              at org.jboss.mx.server.registry.BasicMBeanRegistry.getMBeanMap(BasicMBeanRegistry.java:956)

              at org.jboss.mx.server.registry.BasicMBeanRegistry.contains(BasicMBeanRegistry.java:580)

              at org.jboss.mx.server.MBeanServerImpl.isRegistered(MBeanServerImpl.java:548)

              at org.jboss.system.ServiceCreator.install(ServiceCreator.java:102)

              at org.jboss.system.microcontainer.InstantiateAction.installAction(InstantiateAction.java:45)

              at org.jboss.system.microcontainer.InstantiateAction.installAction(InstantiateAction.java:37)

              at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

              at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

              at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

              at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:298)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:823)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

              at org.jboss.system.ServiceController.doChange(ServiceController.java:689)

              at org.jboss.system.ServiceController.install(ServiceController.java:275)

              at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:90)

              at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

              at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

              at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1448)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1166)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1187)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1107)

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:823)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:783)

              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:699)

              at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

              at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

              at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

              at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:775)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)

              at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)

              at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:258)

              at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:97)

              at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:860)

              at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:441)

              at java.lang.Thread.run(Thread.java:662)

      05:34:48,196 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/people/calduser/jboss-6.0.0.M1/server/default/deploy/SSLNEar.ear/ state=PreReal mode=Manual requiredState=Real

      • org.jboss.deployers.spi.DeploymentException: Error deploying: :service=Scheduler

              at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)

              at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:118)

              at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

              at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

        • 1. Re: Jboss(6) Scheduler deploy issues on linux server,works on Windows
          calduser

          i tried to add jboss to name=:service

          here is the exception.

           

          *** DEPLOYMENTS IN ERROR: Name -> Error

          vfsfile:/people/calduser/jboss-6.0.0.M1/server/default/deploy/SSLNEar.ear/ -> org.jboss.deployers.spi.DeploymentException: Error deploying: jboss:service=Scheduler


          DEPLOYMENTS IN ERROR:
            Deployment "vfsfile:/people/calduser/jboss-6.0.0.M1/server/default/deploy/SSLNEar.ear/" is in error due to the following reason(s): java.security.InvalidParameterException: Given class com.callidus.ssln.server.util.PollingThread is not  not found

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1002)
                  at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:948)
                  at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:870)

          • 3. Re: Jboss(6) Scheduler deploy issues on linux server,works on Windows
            jaikiran

            calduser CS wrote:

             

            i tried to add jboss to name=:service

            here is the exception.

             

            *** DEPLOYMENTS IN ERROR: Name -> Error

            vfsfile:/people/calduser/jboss-6.0.0.M1/server/default/deploy/SSLNEar.ear/ -> org.jboss.deployers.spi.DeploymentException: Error deploying: jboss:service=Scheduler

            Does it work on 6.0.0.Final? What error do you see there?

            • 4. Re: Jboss(6) Scheduler deploy issues on linux server,works on Windows
              calduser

              hi Jaikiran,

              Thank you for your reply.

              I have already tried that option to append jboss for service name.

               

               

               

              as i mentioned in above post, it still gives this exception.

               

               

               

              13:26:06,120 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

              DEPLOYMENTS IN ERROR:
                Deployment "vfsfile:/people/calduser/jboss-6.0.0.M1/server/default/deploy/SSLNEar.ear/" is in error due to the following reason(s): java.security.InvalidParameterException: Given class com.callidus.ssln.server.util.PollingThread is not  not found

              13:26:06,133 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080

              <mbean code="org.jboss.varia.scheduler.Scheduler"

              name="jboss:service=Scheduler">

              <attribute name="StartAtStartup">true</attribute>

              <attribute name="SchedulableClass">com.callidus.ssln.server.util.PollingThread</attribute>

              <attribute name="SchedulableArguments">Polling,12345</attribute>

              <attribute name="SchedulableArgumentTypes">java.lang.String,int</attribute>

              <attribute name="InitialStartDate">NOW</attribute>

              <attribute name="SchedulePeriod">300000</attribute>

              <attribute name="InitialRepetitions">-1</attribute>

              <attribute name="FixedRate">true</attribute>

              <depends>

              <mbean code="javax.management.timer.Timer" name="jboss:service=Timer"/>

              </depends>

              </mbean>

              • 5. Re: Jboss(6) Scheduler deploy issues on linux server,works on Windows
                calduser

                hi jaikiran,

                i have jboss6.0.0.Final in Windows. this takes scheduler with or without jboss being appended to service name and is running scheduler.

                The issue i am facing is with LINUX server, which has jboss6.0.0.M1 version. this is giving above exceptions. I have tried to download the same EAR and deployed in my windows environment, same ear works fine in windows JBOSS6.0.0.Final.

                 

                is there a difference between jboss6.0.0.Final to jboss6.0.0.M1 versions that we have on windows and Linux?

                • 6. Re: Jboss(6) Scheduler deploy issues on linux server,works on Windows
                  calduser

                  yes infact that was the issue.

                  installed jboss6.0.0.M1 on windows and the error was reproducible where as this is not coming in jboss6.0.0.Final. will install jboss6.0.0.Final and see if it works too.

                  thanks Jaikiran for spontaneous replies.