Jmeter-java Request execution Error: Java.lang.NoSuchFieldError:INSTANCE

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.