1 Reply Latest reply on Jul 3, 2003 4:55 AM by norrin88

    Cannot create VERY simple custom mbean

    norrin88 Newbie

      Hi! I'm trying to create a simple custom mbean, similar (or equal to) the StartUpService mbean previously discussed in these forums. But I don't know what I'm missing, because I believe everything is correctly set up. I'm using jboss3.2.1_tomcat4.1.24, the mbean code classes are built in a jar file (among other classes) and it is named "whatever.jar" and I've written a whatever-service.xml like this one:

      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE server>

      <!-- $Id: whatever-service.xml,v 0.1 2003/07/01 10:00:00 starksm Exp $ -->










      avalue




      both .jar and -service.xml files are deployed in the server/default/deploy folder. The jar file is deployed fine, but the service is not. Here is the error I get:

      10:09:03,190 INFO [MainDeployer] Starting deployment of package: file:/home/juanma/jboss_tomcat/server/default/deploy/whatever-service.xml
      10:09:03,235 WARN [NestedThrowable] Duplicate throwable nesting of same base type: class org.jboss.deployment.DeploymentException is assignable from: class org.jboss.deployment.DeploymentException
      10:09:03,236 ERROR [MainDeployer] could not create deployment: file:/home/juanma/jboss_tomcat/server/default/deploy/whatever-service.xml
      org.jboss.deployment.DeploymentException: create operation failed for package file:/home/juanma/jboss_tomcat/server/default/deploy/whatever-service.xml; - nested throwable: (org.jboss.deployment.DeploymentException: test.StartUpServiceMBean.();
      - nested throwable: (java.lang.NoSuchMethodException: test.StartUpServiceMBean.()))
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:202)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:784)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:639)
      ...

      The interface StartUpServiceMBean and the implementation StartUpService should be ok, because I've copied them from a successful post... From the error messages I think I'm missing an "init" or "create" method, but they don't seem to be needed for the interface. Other possibility is that I should create a sar deployment, with a jboss-service.xml inside but this is not what I'm looking for. I'm trying to deploy a service such as properties-service.xml which came with the jboss distribution.

      Any more ideas? Please help me! My job is on a tightrope :-(

      Thanks in advance