2 Replies Latest reply on Nov 5, 2002 11:08 PM by Mirza Mohsin Beg

    MBean deployment error

    Mirza Mohsin Beg Newbie

      Hi,

      I dont know what I am doing wrong, by building a sar and putting it in the deploy directory to get a MBean running. I am using Jboss3.0.2, jdk1.4.1, j2ee1.3.1. Can someone please help, since this is driving me bonkers ?

      -Mohsin

      13:57:07,204 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@79578065{ url=file:/opt/Certive/jboss/server/default/deploy/myplugin.sar, deployedLastModified=0 }
      org.jboss.deployment.DeploymentException: Class does not expose a management interface: myservice.plugins.MyInstanceService; - nested throwable: (javax.management.NotCompliantMBeanException: Class does not expose a management interface: myservice.plugins.MyInstanceService)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:155)
      at org.jboss.system.ServiceController.install(ServiceController.java:224)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      ..........

      public class MyInstanceService
      extends org.jboss.system.ServiceMBeanSupport
      {
      public String getMyAttr() {return "meow";}
      public void setMyAttr(String attr) {}
      public void startService() throws Exception {}
      public void stopService() throws Exception {}
      }


      meow

        • 1. Re: MBean deployment error
          Adrian Brock Master

          public class MyInstanceService
          extends org.jboss.system.ServiceMBeanSupport
          implements MyInstanceServiceMBean
          {
          public String getMyAttr() {return "meow";}
          public void setMyAttr(String attr) {}
          public void startService() throws Exception {}
          public void stopService() throws Exception {}
          }

          public interface MyInstanceServiceMBean
          extends org.jboss.system.Service
          {
          String getMyAttr();
          void setMyAttr(String attr);
          }

          MyInstanceServiceMBean defines your management interface.

          Regards,
          Adrian

          • 2. Re: MBean deployment error
            Mirza Mohsin Beg Newbie

            Hi,

            Thanks for your help. I did have all those interfaces defined in my real example. The interface class has to be the same name as the bean+"MBean". I would have never guessed.

            Thanks a million!

            -Mohsin