2

我将 IDEA 配置为使用 java 任务控制,如下所示 -

在此处输入图像描述

在调试主要方法期间,我在 Java Mission control 上遇到了以下异常-

java.lang.RuntimeException: Could not connect to com.seleniumtests.tests.RetryTest (11952). Make sure the JVM is running and that you are using the correct protocol in the Service URL (null).
at com.jrockit.mc.flightrecorder.controlpanel.ui.FlightRecorderProvider.refresh(FlightRecorderProvider.java:109)
at com.jrockit.mc.browser.views.JVMBrowserView$1.run(JVMBrowserView.java:102)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.jrockit.mc.rjmx.ConnectionException caused by com.jrockit.mc.browser.attach.LazyServiceURLResolveException: The in memory agent can not be started on this JVM, since attach is not supported! If you're trying to connect to a 32-bit JVM with a 64-bit Mission Control or vice versa, start the management agent manually by using the JVM flag -Dcom.sun.management.jmxremote for your JVM prior to trying to connect to it.
at com.jrockit.mc.rjmx.internal.RJMXConnection.connect(RJMXConnection.java:534)
at com.jrockit.mc.rjmx.ServerHandle.doConnect(ServerHandle.java:89)
at com.jrockit.mc.rjmx.ServerHandle.connect(ServerHandle.java:70)
at com.jrockit.mc.flightrecorder.controlpanel.ui.FlightRecorderProvider.refresh(FlightRecorderProvider.java:96)
... 8 more
Caused by: com.jrockit.mc.browser.attach.LazyServiceURLResolveException: The in memory agent can not be started on this JVM, since attach is not supported! If you're trying to connect to a 32-bit JVM with a 64-bit Mission Control or vice versa, start the management agent manually by using the JVM flag -Dcom.sun.management.jmxremote for your JVM prior to trying to connect to it.
at com.jrockit.mc.browser.attach.LocalConnectionDescriptor.createJMXServiceURL(LocalConnectionDescriptor.java:166)
at com.jrockit.mc.rjmx.internal.RJMXConnection.connect(RJMXConnection.java:532)
... 11 more 

我正在运行 64 位 java (jdk1.7.0_72) 并且在 IntelliJ 中用作 sdk

测试方法是——

public static void main(final String[] args) {
    System.out.println(System.getProperty("sun.arch.data.model"));
}

我错过了任何配置吗?

4

2 回答 2

1

Necroposting在这里,但也许会在以后帮助某人。

我有一个非常相似的问题,其堆栈和原因是由企业 AV 解决方案引起的,这决定了这显然是一个漏洞。调整它的设置以允许连接修复它。

于 2016-07-06T19:25:09.333 回答
0

该方法将执行得非常快。您可能想要做的是在命令行上开始录制。您可以使用以下 VM 选项来执行此操作,

-XX:+UnlockCommercialFeatures 
-XX:+FlightRecorder 
-XX:StartFlightRecording=filename=recording.jfr

然后在 JMC 中打开该文件。

于 2016-01-05T22:31:14.387 回答