JMX in Beanshell

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

JMX in Beanshell

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);

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


Can anyone offer any assistance?