Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/320.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 调用JProfiler时出现未满足的链接错误_Java_Jenkins_Jprofiler - Fatal编程技术网

Java 调用JProfiler时出现未满足的链接错误

Java 调用JProfiler时出现未满足的链接错误,java,jenkins,jprofiler,Java,Jenkins,Jprofiler,我正在尝试使用Jprofiler的离线评测API将Jprofiler 8.1.4与jenkins集成。 下面是编写到的程序 启动JProfiler录制 保存快照 停止JProfiler录制 导入java.io.File; 导入java.io.IOException 公共类测试集成{ 公共静态连接connObj=null; public static void recordCPUdata()抛出java.io.IOException、interruptedeexception{ File

我正在尝试使用Jprofiler的离线评测API将Jprofiler 8.1.4与jenkins集成。 下面是编写到的程序

  • 启动JProfiler录制
  • 保存快照
  • 停止JProfiler录制

    导入java.io.File; 导入java.io.IOException

    公共类测试集成{ 公共静态连接connObj=null; public static void recordCPUdata()抛出java.io.IOException、interruptedeexception{

        File fileObj;
        fileObj = new File("C:\\Perl\\firstSnap.jps");
        Controller.startCPURecording(true);
                System.out.println("CPU recording started..");
    
                   Controller.saveSnapshot(fileObj);
        System.out.println("Saved snapshot");
    
                   Controller.stopCPURecording();
        System.out.println("CPU recording stopped..");    
    
    }
    
    public static void main(String[] args) throws IOException, InterruptedException {
          try {
    
            recordCPUdata();
        } catch (IOException e) {
            e.printStackTrace();
        }
    
    }
    
    }

Jprofiler工具可以手动启动录制、保存快照和停止录制。但当我执行该程序时,会收到以下错误消息UnsatifiedLinkError:

  • 我使用了JProfiler本身提供的Demo服务器评测,我在运行Demo应用程序的同一个系统中评测
  • 注意:服务器和客户端使用的是相同的JProfilerTI.dll。这会是一个问题。
java.lang.UnsatifiedLinkError:com.jprofiler.agent.interceptonCallee.registerI interception0(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;Ljava/la ng/反射/方法;)V 在com.jprofiler.agent.interceptonCallee.RegisterInterception0(本机 (方法) 在com.jprofiler.agent.interceptonCallee.registerInterceptions(ejt:152)上

/用户打印的报表/
保存的快照

JProfiler> Native library not found. Ignoring controller call.

/用户打印的语句/
CPU录制已停止。

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


Session->Integration Wizards->New Remote Integration

我的问题是无法使用上述Jprofiler程序开始录制。现在我尝试在程序中加载System.loadLibrary,JVM崩溃。Java运行时环境检测到致命错误:#异常(0xc0000005)pc=0x00000001800719bd,pid=3844,t id=5352##JRE版本:Java(TM)SE运行时环境(7.0_60-b19)(构建1.7.0_60-b19)#无法写入核心转储。默认情况下,在Windows的客户端版本上不启用小型转储。有任何解决方案吗?您尝试过集成向导吗?您不能使用loadLibrary,必须传递集成向导给定的-agentpath VM参数否,必须在已分析的JVM中运行的代码中进行控制器调用,您永远不需要手动加载JProfiler库。没有单独的JProfiler进程,除非您指的是与脱机分析无关的JProfiler GUI。很抱歉,我错误地添加了这一点。现在请检查我的代码您是否添加了-agentpath VM参数,是否有一行前缀为“JProfiler>”你什么时候开始这个计划?因为如果不开始,它就不起作用了。
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)
JProfiler> Native library not found. Ignoring controller call.