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
 
 01:08:39,319 INFO  [MainDeployer] Starting deployment of package: file:/u/public/jboss/jboss-3.0.2/server/default/deploy/acaiis-scheduler-service.xml
01:08:39,529 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.system.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.system.ServiceMBean
{
   public void start() throws Exception;
   public void stop() throws Exception;
   public boolean createScheduler() throws Exception;
}

Reply via email to