1 Reply Latest reply on Apr 24, 2008 7:21 AM by Kevin Conner

    "No 'jboss' MBeanServer found!"

    Luiz Antonio Falaguasta Barbosa Novice

      Hi people,

      I've been developing a component to read informations of jboss-esb.xml into .esb packages.

      So, to get all the files into server/default/deploy, I've based my code in the ESBConfigEditor Derek's code. In this way, to create a reference to the server/default/deploy directory, I run the follow instruction:

      ServerConfig config = ServerConfigLocator.locate();

      When I run this instruction, the following exception is thrown, from the MBeanServerLocator.locateJBoss() method:

      throw new IllegalStateException("No 'jboss' MBeanServer found!");

      The stack trace since the line I call ServerConfigLocator.locate() is:

      Exception in thread "main" java.lang.IllegalStateException: No 'jboss' MBeanServer found!
      at org.jboss.mx.util.MBeanServerLocator.locateJBoss(MBeanServerLocator.java:122)
      at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:335)
      at org.jboss.system.server.ServerConfigLocator.locate(ServerConfigLocator.java:42)
      at org.jboss.configapp.DAMConnectorToJBoss.getFilesInDeployDirectory(DAMConnectorToJBoss.java:65)

      I start the execution from a test class into the .WAR deployed into JBoss. When I do this through a Servlet, I don't get this exception.

      If somebody could give me some help, I'll appreciate it!

      Thanks in advance!

      Regards,

      Luiz