JMX in Beanshell

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

JMX in Beanshell

chrismith85
I'm trying to use a Beanshell script to connect to another program via JMX. The client code works perfectly in Java, and it even works when I create a Beanshell interpreter in my Java program and pass it the code. But running the code directly in Beanshell causes the connection to fail. The code in question looks something like this:

JMXServiceURL url = new JMXServiceURL("jmxmp", host, thePort);
jmxc = JMXConnectorFactory.newJMXConnector(url, null);
jmxc.connect();

Upon execution of the connect(), this exception is thrown:

java.lang.RuntimeException: java.io.IOException: javax.management.remote.message.HandshakeBeginMessage

Can anyone offer any assistance?

Thanks,
Chris
Loading...