Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/369.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java JMX RuntimeException操作失败,状态为等待_Java_Jmx - Fatal编程技术网

Java JMX RuntimeException操作失败,状态为等待

Java JMX RuntimeException操作失败,状态为等待,java,jmx,Java,Jmx,我正在尝试运行Oracle JMX示例,该示例由一个代理和一个客户端组成。代理运行得很好,但当我尝试运行客户端时,会出现异常: Exception in thread "main" java.lang.RuntimeException: Operation failed with status WAITING at org.jboss.remotingjmx.RemotingConnector.connect(RemotingConnector.java:154) at java

我正在尝试运行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);

有人知道这是什么原因吗?

我知道这是一个非常古老的问题,但我最近遇到了同样的问题

在我的例子中,更新连接器以使用http协议成功地找到了连接。”“远程处理jmx”也已被弃用,应更新为“远程”:

String host = "localhost";
int port = 9999;
String urlString = System.getProperty("jmx.service.url","service:jmx:remote+http://" + host + ":" + port);
JMXServiceURL url = new JMXServiceURL(urlString);
JMXConnector jmxc = JMXConnectorFactory.connect(url);

你解决过这个问题吗?我也想知道!对不起,伙计们,我记不清我是怎么解决的了。或者我甚至解决了它。