Jmeter- java.lang.ClassNotFoundException: com.jayway.jsonpath.internal.JsonReader

Jmeter- java.lang.ClassNotFoundException: com.jayway.jsonpath.internal.JsonReader

jp@gc-JSON Jmeter-3 中的路径断言失败。同样在 Jmeter-2.13 中工作正常。以下是完整的错误跟踪

Thread started: setUp Thread Group 1-1 
2016/07/17 21:46:43 INFO  - jmeter.services.FileServer: Stored: E:\jmeter3\JmxFiles\JbpmTables.csv 
2016/07/17 21:46:49 INFO  - jmeter.threads.JMeterThread: Thread is done: setUp Thread Group 1-1 
2016/07/17 21:46:49 INFO  - jmeter.threads.JMeterThread: Thread finished:  setUp Thread Group 1-1 
2016/07/17 21:46:49 INFO  - jmeter.engine.StandardJMeterEngine: All Setup Threads have ended 
2016/07/17 21:46:49 INFO  - jmeter.engine.StandardJMeterEngine: Starting ThreadGroup: 1 : Loan ProcessGroups 
2016/07/17 21:46:49 INFO  - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group Loan ProcessGroups. 
2016/07/17 21:46:49 INFO  - jmeter.engine.StandardJMeterEngine: Thread will continue on error 
2016/07/17 21:46:49 INFO  - jmeter.threads.ThreadGroup: Starting thread group number 1 threads 1 ramp-up 1 perThread 1000.0 delayedStart=false 
2016/07/17 21:46:49 INFO  - jmeter.threads.ThreadGroup: Started thread group number 1 
2016/07/17 21:46:49 INFO  - jmeter.engine.StandardJMeterEngine: All thread groups have been started 
2016/07/17 21:46:49 INFO  - jmeter.threads.JMeterThread: Thread started: Loan ProcessGroups 1-1 
2016/07/17 21:46:49 INFO  - jmeter.services.FileServer: Stored:  E:\Jmeter\LoanProcessGroups.csv 
2016/07/17 21:46:49 INFO  - jmeter.protocol.http.sampler.HTTPHCAbstractImpl: Local host = 478T5Z1 
2016/07/17 21:46:49 INFO  - jmeter.protocol.http.sampler.HTTPHC4Impl: HTTP request retry count = 0 
2016/07/17 21:46:50 ERROR - jmeter.threads.JMeterThread: Error processing Assertion  java.lang.NoClassDefFoundError: com/jayway/jsonpath/internal/JsonReader
at com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion.doAssert(JSONPathAssertion.java:80)
at com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion.getResult(JSONPathAssertion.java:132)
at org.apache.jmeter.threads.JMeterThread.processAssertion(JMeterThread.java:755)
at org.apache.jmeter.threads.JMeterThread.checkAssertions(JMeterThread.java:746)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:490)
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(Unknown Source)

看起来您已经 Extras with Libs set of JMeter plugins 与 JMeter 2.13 一起安装,但没有为 JMeter 3.0 安装它们

解决方案是:

  1. 切换到JSON Path PostProcessor and Response Assertion组合
  2. 通过 JMeter Plugin Manager 安装 JSON Plugin