首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >调用UnsatisfiedLinkError时的JProfiler

调用UnsatisfiedLinkError时的JProfiler
EN

Stack Overflow用户
提问于 2015-05-28 12:55:05
回答 1查看 481关注 0票数 0

我试图使用JProfiler的离线分析API将Jprofiler8.1.4与jenkins集成起来。下面是写入的程序

  • 启动JProfiler录音。
  • 保存快照。
  • 停止JProfiler录音。 进口java.io.File;进口java.io.IOException; 公共类TestJenJPIntegration {公共静态连接connObj = null;公共静态空recordCPUdata()抛出java.io.IOException,InterruptedException{ 文件fileObj;fileObj =新文件(“C:\Perl\firstSnap.jps”);Controller.startCPURecording(真);System.out.println("CPU记录开始.“);Controller.saveSnapshot(fileObj);System.out.println(”保存快照“);Controller.stopCPURecording();System.out.println("CPU记录停止.”);}公共静态空主(String[] args)抛出IOException,InterruptedException { try { recordCPUdata();} catch (IOException e) { e.printStackTrace();}} }

Jprofiler工具手动工作很好,可以开始记录、保存快照和停止记录。但是,当我执行该程序时,我会得到以下错误消息UnsatisfiedLinkError:

  • 我使用了Demo分析,这在JProfiler本身中是可用的。我正在演示应用程序运行的同一个系统中进行分析。
  • 注意:服务器和客户端正在使用相同的JProfilerTI.dll --这会是一个问题吗.

com.jprofiler.agent.InterceptionCallee.registerI nterceptions0(Z[Lcom/jprofiler/agent/util/h;Ljava/lang/reflect/Field;Ljava/lang/ reflect/Field;Ljava/lang/reflect/Field;Ljava/lang/reflect/Field;Ljava/lang/refle ct/Field;Ljava/lang/reflect/Field;Ljava/lang/reflect/Field;Ljava/lang/reflect/Fi eld;Ljava/lang/reflect/Field;Ljava/lang/Class;Ljava/lang/reflect/Method;java.lang.UnsatisfiedLinkErrorLjava/la ng/reflect/Method;)V在com.jprofiler.agent.InterceptionCallee.registerInterceptions0(Native方法)在com.jprofiler.agent.InterceptionCallee.registerInterceptions(ejt:152) )

代码语言:javascript
复制
        at com.jprofiler.agent.probe.y.a(ejt:181)
        at com.jprofiler.agent.probe.y.a(ejt:37)
        at com.jprofiler.agent.Agent.initStatic(ejt:320)
        at com.jprofiler.agent.Agent.<clinit>(ejt:98)
        at com.jprofiler.agent.ControllerImpl.startCPURecording(ejt:53)
        at com.jprofiler.api.agent.Controller.startCPURecording(ejt:108)
        at TestJenJPIntegration.recordCPUdata(TestJenJPIntegration.java:24)
        at TestJenJPIntegration.main(TestJenJPIntegration.java:45)
JProfiler> Native library not found. Ignoring controller call.

/Users打印报表/

代码语言:javascript
复制
CPU recording started..

Exception in thread "_jprofiler_offline_comm" java.lang.UnsatisfiedLinkError: co
m.jprofiler.agent.ControllerImpl.saveSnapshot0([BLjava/lang/Object;)V
        at com.jprofiler.agent.ControllerImpl.saveSnapshot0(Native Method)
        at com.jprofiler.agent.ControllerImpl.access$100(ejt:18)
        at com.jprofiler.agent.h.run(ejt:186)

/Users打印声明/ Saved snapshot

代码语言:javascript
复制
JProfiler> Native library not found. Ignoring controller call.

/Users打印声明/ CPU recording stopped..

EN

回答 1

Stack Overflow用户

发布于 2015-05-28 13:55:07

com.jprofiler.api.platform不是用于脱机分析,而是用于编写直接分析分析数据的程序。您应该只使用Controller类,并按照集成向导的要求,使用脱机开关传递-agentpath VM参数

会话->集成向导->新的远程集成

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30507200

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档