我正在尝试运行由代理和客户端组成的 Oracle JMX 示例。代理运行完美,但是当我尝试运行客户端时出现异常:
Exception in thread "main" java.lang.RuntimeException: Operation failed with status WAITING
at org.jboss.remotingjmx.RemotingConnector.connect(RemotingConnector.java:154)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:268)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:227)
at com.example.Client.main(Client.java:61)
这是出错的代码部分:
String host = "localhost";
int port = 9999;
String urlString = System.getProperty("jmx.service.url","service:jmx:remoting-jmx://" + host + ":" + port);
JMXServiceURL url = new JMXServiceURL(urlString);
JMXConnector jmxc = JMXConnectorFactory.connect(url);
有谁知道这可能是什么原因?