1 Reply Latest reply on Oct 26, 2010 10:34 AM by Abdeltif Nouqrat

    sar deployment problem with jboss 4.2.3

    Abdeltif Nouqrat Newbie

      Hi,

      I have a service archiv, which contains a standard MBean written using JDK 1.4.0.

      The deployment of this service was successful in JBOSS 4.0.5.

      Yet I switched to JBOSS 4.2.3 with JRE 1.6, I get the following Error when JBOSS tries to deploy my sar file.

      P.S. The same problem occurs when I compiled my service using JDK 1.6 and then packaged it to an sar file.

       

      Header 1
      2010-10-25 14:12:48,880 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] (ScannerThread) Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@eef2b0ea{ url=file:/C:/Program Files/Suite/server/default/deploy/remote_control_gateway.sar, deployedLastModified=0 }
      org.jboss.deployment.DeploymentException: - nested throwable: (java.lang.NullPointerException)
          at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:196)
          at org.jboss.system.ServiceController.install(ServiceController.java:226)
          at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
          at $Proxy4.install(Unknown Source)
          at org.jboss.deployment.SARDeployer.create(SARDeployer.java:251)
          at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
          at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
          at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
          at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
          at $Proxy9.deploy(Unknown Source)
          at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
          at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
          at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
          at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
          at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      Caused by: 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:959)
          at org.jboss.mx.server.registry.BasicMBeanRegistry.contains(BasicMBeanRegistry.java:577)
          at org.jboss.mx.server.MBeanServerImpl.isRegistered(MBeanServerImpl.java:539)
          at org.jboss.system.ServiceCreator.install(ServiceCreator.java:101)
          at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:451)
          at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
          ... 33 more

       

      Can anybody tell me, what is the cause of the problem ?

      Is the packaging of an MBean in JBOSS 4.2.3 unlike in JBOSS 4.0.5 ?

      Perhaps the Standard MBean should use JBOSS-Annotations (@Service, @Management, etc.)?

       

      Please help.

      Best regards.

      Abdeltif

        • 1. Re: sar deployment problem with jboss 4.2.3
          Abdeltif Nouqrat Newbie

          Hi again,

          Problem solved.

          in jboss-service.xml the name of the service was ":service=MyService"
            instead of "jboss:service=MyService": The domain "jboss" was missing.

          It seams that JBOSS 4.0.5.GA has no problem with ":service=MyService", but
          JBOSS 4.2.3.GA requires the domain "jboss" in the service name.
          This was the cause of the "java.lang.NullPointerException" at deployment-start of MBean Service.