我正在尝试针对CorDapp运行一些检测/分析 - 对于这个问题,示例cordapp在这里:https://github.com/corda/cordapp-example.git版本发布-3。
但是,当我尝试使用来自corda shell的jvm runtime
将VisualVM连接到正在运行的PID时,我会收到如下错误:
(从VisualVM的“配置文件”选项卡)
Mon Jun 11 15:17:36 BST 2018>>> Profiler Agent: JNI OnLoad Initializing...
Profiler Agent: JNI OnLoad Initialized successfully
Profiler Agent: Waiting for connection on port 5140 (Protocol version: 18)
Profiler Agent: Established connection with the tool
Profiler Agent: Local accelerated session
Profiler Agent Error: Exception when handling command from client:
java.io.InvalidClassException: filter status: REJECTED
Profiler Agent: Connection with agent closed
或(来自Sampler选项卡)
CPU sampling:
Not available. Cannot access threads in target application. Check the logfile for details (use Help | About | Logfile).
日志文件给了我这个有用的错误:
WARNING [org.netbeans.modules.profiler.NetBeansProfiler]: IDEAppStatusHandler - error: {)}
*** Profiler error (Mon Jun 11 15:17:59 BST 2018): exception while trying to get response from the target JVM:
java.net.SocketException: Connection reset
INFO [com.sun.tools.visualvm.sampler.cpu.ThreadInfoProvider]: mxbeans.getThreadMXBean() returns null for Application [id: localhost-10884, pid: 10884, host: localhost]
我在MacOS和Ubuntu上都尝试了这个,我也遇到了同样的问题 - 所以我不认为这是一个Java安装问题。
任何指针!?
答案 0 :(得分:2)
VisualVM使用Java序列化。 Corda出于安全原因禁止Java序列化。
open protected fun banJavaSerialisation(conf: NodeConfiguration) {
SerialFilter.install(if (conf.notary?.bftSMaRt != null) ::bftSMaRtSerialFilter else ::defaultSerialFilter)
}