4 Replies Latest reply on Sep 19, 2002 11:02 PM by garyg

    mbean not registered?

    garyg

      I'm still having problems getting a simple MBean to deploy. Below is the errors I'm getting and the MBean code itself.

      Any help much appreciated.

      --- jboss 3.0.2 error output
      ...
      02:04:33,208 INFO [MainDeployer] Deployed package: file:/u/public/jboss/jboss-3.0.2/server/default/deploy/acaiis-service.xml
      02:04:33,212 INFO [MainDeployer] Starting deployment of package: file:/u/public/jboss/jboss-3.0.2/server/default/deploy/acaiis-scheduler-service.xml
      02:04:33,372 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@23d7cabd{ url=file:/u/public/jboss/jboss-3.0.2/server/default/deploy/acaiis-scheduler-service.xml, deployedLastModified=0 }
      org.jboss.deployment.DeploymentException: DefaultDomain:service=Scheduler is not registered.; - nested throwable: (javax.management.InstanceNotFoundException: DefaultDomain:service=Scheduler is not registered.)
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:227)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:755)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:615)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)

      ---

      public class Scheduler extends org.jboss.util.ServiceMBeanSupport
      implements SchedulerMBean
      {
      private String name;

      public boolean createService() {

      System.out.println("Creating MBean ...........");
      log.info(Scheduler.class, "Creating MBean ...........");

      SchedulerFactory schedFact = new StdSchedulerFactory();
      Scheduler sched = schedFact.getScheduler();

      sched.start();

      return true;
      }

      public String getName() {
      return "Scheduler name = " + name;
      }

      public void startService()() throws Exception {
      log.info(Scheduler.class, "Starting Scheduler Service MBean ...........");
      System.out.println("starting MBean ...........");
      }

      public void stopService() throws Exception {
      log.info(Scheduler.class, "Stopping Scheduler Service MBean ...........");
      System.out.println("stoping MBean ...........");
      }
      }

      ---

      public interface SchedulerMBean extends org.jboss.util.ServiceMBean
      {
      public void start() throws Exception;
      public void stop() throws Exception;
      public boolean createScheduler() throws Exception;
      }

        • 1. Re: mbean not registered?

          In 3.x it should be org.jboss.system not org.jboss.util

          Regards,
          Adrian

          • 2. Re: mbean not registered?
            garyg

            Which only makes me wonder why I didn't see a ClassNotFound rather then the still current error msg.

            So I made that change, but still seeing the exact same errors. The main part of the error msg I believe is this.

            ---
            org.jboss.deployment.DeploymentException: DefaultDomain:service=Scheduler is not registered.; - nested throwable: (javax.management.InstanceNotFoundException: DefaultDomain:service=Scheduler is not registered.)

            Any other ideas?

            • 3. Re: mbean not registered?

              Sounds like you have some old 2.x jars somewhere.
              This might be the cause of the problem?

              Regards,
              Adrian

              • 4. Re: mbean not registered?
                garyg

                Not likely, it's a complete unzip of the 3.0.2 server now. No 2.x files available anywheres in the environment.