[ mx4j-Bugs-1021305 ] NoSuchMethodError - class file inconsistency

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.java.mx4j.devel
Message-ID <[email protected]>
Bugs item #1021305, was opened at 2004-09-02 09:46
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=450647&aid=1021305&group_id=47745

Category: JMX implementation
Group: Release 2.0.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Archie Cobbs (archiecobbs)
Assigned to: Nobody/Anonymous (nobody)
Summary: NoSuchMethodError - class file inconsistency

Initial Comment:
Trying to use MX4J on JDK 1.4.2 and getting this exception:

     [java] Exception in thread "main"
java.lang.NoSuchMethodError:
javax.management.ObjectName.getInstance(Ljavax/management/ObjectName;)Ljavax/management/ObjectName;
     [java]     at
mx4j.server.MX4JMBeanServer.secureObjectName(MX4JMBeanServer.java:1478)
     [java]     at
mx4j.server.MX4JMBeanServer.registerMBeanImpl(MX4JMBeanServer.java:743)
     [java]     at
mx4j.server.MX4JMBeanServer.access$000(MX4JMBeanServer.java:100)
     [java]     at
mx4j.server.MX4JMBeanServer$3.run(MX4JMBeanServer.java:772)
     [java]     at
java.security.AccessController.doPrivileged(Native Method)
     [java]     at
mx4j.server.MX4JMBeanServer.privilegedRegisterMBean(MX4JMBeanServer.java:768)
     [java]     at
mx4j.server.MX4JMBeanServer.<init>(MX4JMBeanServer.java:176)
     [java]     at
mx4j.server.MX4JMBeanServerBuilder.newMBeanServer(MX4JMBeanServerBuilder.java:53)
     [java]     at
javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:183)
     [java]     at
javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:118)
     [java]     at
javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:112)
     [java]     at
com.awarix.trak.client.Main.main(Main.java:74)



My test code looks like this:

        // Use MX4J
       
System.setProperty("javax.management.builder.initial",
          "mx4j.server.MX4JMBeanServerBuilder");
 
        // Create MBean server
        MBeanServer mbeanServer =
MBeanServerFactory.createMBeanServer();
 

If I remove the System.setProperty() call it works. This
seems backwards from what the documentation says,
or else I'm confused.




----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=450647&aid=1021305&group_id=47745


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.