当我在同一台服务器和同一用户“管理员”上运行可视化 VM 和 WebSphere 7 时
我收到此错误: 内存采样: 无法使用。无法连接到目标应用程序。确保应用程序在受支持的 Java 6、Java 7 或 Java 8 上运行。
环境:
JVM 1.3.8
- JVM: Java HotSpot(TM) Client VM (24.65-b04, mixed mode, sharing)
Webspher 7
- JVM: IBM J9 VM (2.4, JRE 1.6.0 IBM J9 2.4 Windows 7 x86-32 jvmwi3260sr15-20131016_170922 (JITenabled, AOT enabled)
J9VM - 20131016_170922
JIT - r9_20130920_46510ifx2
GC - GA24_Java6_SR15_20131016_1337_B170922)
最佳答案
将以下内容添加到 JVM 启动参数中:
-agentlib:JPIBootLoader=JPIAgent:server=controlled;CGProf
在 WebSphere 中,这应该可以使用 WebSphere Application Server 管理控制台(也称为“IBM Integrated Solutions Console”)进行编辑。
您需要确保探查器库环境变量设置正确:
Setting up environment variables to profile a (WebSphere) server
<小时/>更新
如果您收到此错误:
JVMJ9TI001E Agent library JPIBootLoader could not be opened. (The specified module could not be found.)
JVMJ9VM015W Initialization error for library j9jvmti24(-3): JVMJ9VM009E J9VMDllMain failed
遵循 IBM 的指南:
关于java - VisualVM内存采样: Not available with websphere,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25971556/