1 Reply Latest reply on Jul 27, 2002 3:21 PM by marc.fleury

    Using XDoclet (JMXDoclet) Problem...

    nickduong

      FYI:

      I was trying to generate some MBean w/ XDoclet (JMXDoclet). XDoclet generated perfectly!!!

      However on deployment I get an error here:

      /**
      *
      * @return
      *
      * @jmx:managed-operation
      */
      public void start() throws Exception {

      // Error here:
      List list =MBeanServerFactory.findMBeanServer(null);

      server = (MBeanServer)list.iterator().next();

      timerObj = new Timer();



      The error is:

      java.lang.NoSuchMethodError: javax.management.MBeanServerFactory.findMBeanServer(Ljava/lang/String;)Ljava/util/List;
      at net.discserver.common.util.jmx.TaskScheduler.start(TaskScheduler.java:97)

      Wow... Nasty error!!!!!!! Doesn't make any sense.

      After a whole day of debugging, the problem was due to the openjmx.jar in $XDOCLET_HOME/lib. So when XDoclet compiled the MBeans, openjmx.jar library was used. JBoss 3.0.x does not seem to be compatible w/ openjmx.jar.

      Solution:
      Replace openjmx.jar w/ jboss-jmx.jar.

      Maybe I did not read the XDoclet properly. But just wanted to share my experience.

      Is this the correct solution?

      Anyhow, overall very impressed w/ JBoss!!!! And XDoclet!!!

      Thanks All!!!

        • 1. Re: Using XDoclet (JMXDoclet) Problem...
          marc.fleury

          Thanks for pointing it out. Please report the problem to the XDoclet list as well and put a bug report in our system so we can follow up with XDoclet. Also Andreas (andy@jboss.org) should know about this, send him an email pointing this out. The bottom line is that openJMX.jar is very old (it changed names like 6 months ago) and also the current version is lagging behind, Simone is doing worthy work there but the versions are behind JBoss. Also JBoss is really the reference implementation on JMX and should really be the target of XDoclet. Let him and them know to please replace the JAR with the latest from us.

          Is JMX generated independently of the rest of JBoss today? we should package the base JBossMX for these guys.
          Please let me know directly by email (marc@Jboss.org) if you talk to them,