4 Replies Latest reply on Oct 26, 2006 7:56 AM by jaikiran

    JMX Deployment error

    galo.navarro

      I've been using an MBean with the @management and @service annotations but as I'm setting up a few services for that application in jboss-service.xml file I'm trying to take off annotations and use the xml descriptors to install it.

      I have this interface

      public interface NOCManagementService extends ServiceMBean


      Which is implemented in this class

      public class NOCManagerService extends ServiceMBeanSupport implements ManagementService


      It just doesn't work.

      17:32:40,226 ERROR [MainDeployer] Could not create deployment: file:/C:/SW/jboss-4.0.4.GA/server/messaging/deploy/NOCManagerService.sar
      org.jboss.deployment.DeploymentException: Class does not expose a management interface: java.lang.Object; - nested throwable: (javax.management.NotCompliantMBeanException: Class does not expose a management interface: java.lang.Object)
       at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:196)
       at org.jboss.system.ServiceController.install(ServiceController.java:226)
       at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       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:249)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
       at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       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 $Proxy6.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
       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: javax.management.NotCompliantMBeanException: Class does not expose a management interface: java.lang.Object
       at org.jboss.mx.metadata.MBeanCapability.of(MBeanCapability.java:102)
       at org.jboss.mx.metadata.MBeanCapability.of(MBeanCapability.java:100)
       at org.jboss.mx.metadata.MBeanCapability.of(MBeanCapability.java:100)
       at org.jboss.mx.metadata.MBeanCapability.of(MBeanCapability.java:100)
       at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:182)
       at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       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.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1422)
       at java.security.AccessController.doPrivileged(Native Method)
       at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1417)
       at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1350)
       at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:345)
       at org.jboss.system.ServiceCreator.install(ServiceCreator.java:157)
       at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:449)
       at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
       ... 33 more
      


      Doesn't it implement a management interface (ServiceMBean)?

      Any ideas?

      Thanks

        • 1. Re: JMX Deployment error
          dimitris

          Make the class a "standard" mbean: class CCC must implement interface CCCMBean.

          • 2. Re: JMX Deployment error
            galo.navarro

            Thanks for answering.

            It seems the deployer tries to install it, but still doesn't work. Now my interface is

            public interface NOCManagerServiceMBean extends ServiceMBean


            and the class is

            public class NOCManagerService extends ServiceMBeanSupport implements NOCManagerServiceMBean


            It tries to deploy but I get this error:

            12:29:13,639 INFO [ServiceConfigurator] Problem configuring service java:NOC=NOCManagerService
            org.jboss.deployment.DeploymentException: No Attribute found with name: serviceStatus
            


            Which is an evil lie as my interface declares both:

             public String getServiceStatus();
             public void setServiceStatus(String s);
            


            and they're implemented

            private static String serviceStatus = "I DO EXIST";
            
            public String getServiceStatus() {
             return serviceStatus;
            }
            
            public void setServiceStatus(String s) {
             serviceStatus=s;
            }
            


            Am I missing something?

            Thanks again

            • 3. Re: JMX Deployment error
              galo.navarro

              In case it matters, i've tried taking the static off the property but still doesn't work.

              • 4. Re: JMX Deployment error
                jaikiran

                 

                12:29:13,639 INFO [ServiceConfigurator] Problem configuring service java:NOC=NOCManagerService
                org.jboss.deployment.DeploymentException: No Attribute found with name: serviceStatus


                I guess in your jboss-service.xml, you have mentioned something like:

                <attribute name="serviceStatus">...


                Change it to:

                <attribute name="ServiceStatus">...


                Note the capital "S".