Background of this test:
1. Using the jmeter pressure test Java Interface, development provides a jar and provides a dependency jar package
2. After writing the test class, package into jar and put D:\software\apache-jmeter-2.13\lib\ext
3. The jmeter can be started normally. Error occurs when you execute a use case
Error:
If you encounter the above problem, do not panic, slowly troubleshoot the problem
The cause of this problem is mostly because some jars are duplicated.
Solution:
1. Determine if the jar you want to test has the same jar as the jmeter, according to my test, I find that there are actually two jars of the same
In the test Class I wrote, the reference Lib
In JMeter (X:\XXXX\apache-jmeter-2.13\lib)
As can be seen, my test class quoted is 4.4.1, but the official website provides the latest JMeter lib or 4.2.X, so we will be the latest jar (4.4.1), replaced by X:\XXXX\apache-jmeter-2.13\lib, So that JMeter also has a new version, so the problem is solved.
Summary: Encounter the above problems, 1. Check if duplicate Jar 2. Version number is consistent
VoiceOver: Before this, the development of the jar provided to me version number is 4.2, this problem does not occur, because the jmeter in the two jar version is higher than the development provided, so jmeter default to use their own;
When these two jar versions in JMeter are lower than the version provided, the problem is exposed. This also embodies the Java features: backwards compatibility
Jmeter-java Request execution Error: Java.lang.NoSuchFieldError:INSTANCE