Re: MBeanServer & getDomains()

"Simone Bordet" <[email protected]>
Newsgroups gmane.comp.java.mx4j.user
Message-ID <[email protected]>
Hi,

> I'm working on a project in java 1.4.1 and as JMX implementation using the
> one from MX4J.

Which version of MX4J ?

> The development is done with eclipse. here are some code snippits:
>
> private MBeanServer server = null;
>
> server = MBeanServerFactory.createMBeanServer("MyServer");
>
> String [] domeinen = server.getDomains();
> for(int i=0;i< domeinen.length;i++)
>          System.out.println(server.getDomains()[i]);
>
>
> No I get an error on de .getDomains() method:
> java.lang.NoSuchMethodError: javax.management.MBeanServer: method
> getDomains()[Ljava/lang/String; not found
>     at
> be.sofico.basecamp.mbeans.MBeanFactory.startMBeanServer
> (MBeanFactory.java:57)

This normally means that you compiled your classes against a more
recent version of JMX, but you run them with an older version.

I would double check your classpath configuration.

Simon
-- 
http://bordet.blogspot.com

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
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.