1 Reply Latest reply on Feb 16, 2005 10:28 AM by eddie07

    calling MBean example doesn't work



      I tried to get the following code (mix of code from the wiki and old examples) to work (first try to use MBEans, so this may be a stupid question):
      InitialContext ctx = new InitialContext();
      //RMIAdaptor server = (RMIAdaptor) ctx.lookup("jmx/rmi/RMIAdaptor");
      MBeanServerConnection server = (MBeanServerConnection) ctx.lookup("jmx/invoker/RMIAdaptor");
      // Get the MBeanInfo for the JNDIView MBean
      //ObjectName name = new ObjectName("jboss:service=JNDIView");
      ObjectName name = new ObjectName("jboss:name=SystemProperties");
      MBeanInfo info = server.getMBeanInfo(name);

      The getMBeanInfo produces the following exception:
      java.lang.NoClassDefFoundError: javax/management/BadStringOperationException

      Is there still something I am missing?

      Thanks for any help,