JMeter错误:jmeter.threads.JMeterThread:测试失败! java.lang.NoSuchFieldError:INSTANCE

时间:2016-07-12 05:13:57

标签: java google-app-engine jenkins jmeter

我正试图通过jmeter在jenkins上进行一些junit测试以进行一些GAE成本测试。至少可以说是一件非常令人头痛的事。至于目前正在发生的事情,我已经为争取这个问题奋斗了,我希望这是最后一个问题。一些关键点:

  1. 通过GUI在本地运行时,我没有任何问题
  2. 通过调用运行它的java程序的shell脚本在Jenkins上运行日志,从日志中获取跟随堆栈跟踪错误
  3. 这是堆栈跟踪:

    2016/07/12 08:53:13 ERROR - jmeter.threads.JMeterThread: Test failed! java.lang.NoSuchFieldError: INSTANCE
        at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.setupClient(HTTPHC4Impl.java:774)
        at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:327)
        at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
        at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1146)
        at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1135)
        at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:465)
        at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:410)
        at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:241)
        at java.lang.Thread.run(Thread.java:745)
    
    2016/07/12 08:53:13 INFO  - jmeter.threads.JMeterThread: Thread finished: jp@gc - Ultimate Thread Group 1-1 
    2016/07/12 08:53:13 INFO  - jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test 
    2016/07/12 08:53:13 INFO  - jmeter.reporters.Summariser: summary =      0 in 00:00:00 = ******/s Avg:     0 Min: 9223372036854775807 Max: -9223372036854775808 Err:     0 (0.00%) 
    2016/07/12 08:53:23 ERROR - jmeter.JMeter: Uncaught exception:  java.lang.NumberFormatException: For input string: "******"
        at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
        at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
        at java.lang.Double.parseDouble(Double.java:538)
        at AutoTest.AutoTestUtil.CheckStats(AutoTestUtil.java:219)
        at AutoTest.AutoTestUtil.main(AutoTestUtil.java:68)
    

1 个答案:

答案 0 :(得分:1)

可以通过classpath解析它具有不同版本的httpcore的相同jar。

保持任何一个jar兼容并删除另一个jar,也应用于httpclient jar。