Hello, Ensure also you don't have another jar that contains the same class.
Regards Hilippe On Friday, January 11, 2013, sebb wrote: > On 11 January 2013 09:10, Darren Bown <[email protected] <javascript:;>> > wrote: > > Hi all. > > > > I originally posted this on Stack Overflow ( > > > http://stackoverflow.com/questions/14158106/jmeter-httpsampler-error-java-lang-nosuchfielderror-def-content-charset-on-p > ) > > It went away and now it's back again and I don't know how to fix it. > > > > Whenever I perform a PUT request in my test plan I get the following > error: > > > > jmeter.threads.JMeterThread: Test failed! java.lang.NoSuchFieldError: > > DEF_CONTENT_CHARSET > > That field is defined in the class org.apache.http.protocol.HTTP which > is in the same jar as > org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl. > > Either your JMeter installation is corrupt, or the JVM is corrupt. > > Re-install JMeter and try again. > > > > 2013/01/04 13:18:18 ERROR - jmeter.threads.JMeterThread: Test failed! > > java.lang.NoSuchFieldError: DEF_CONTENT_CHARSET > > at > > > org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sendEntityData(HTTPHC4Impl.java:1023) > > at > > > org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:281) > > at > > > org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62) > > at > > > org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1075) > > at > > > org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1064) > > at > > > org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:426) > > at > org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255) > > at java.lang.Thread.run(Thread.java:680) > > I've tried a number of things: I added a content type to the Content > > encoding field, tried commenting out this line in the test plan: > > > > <stringProp name="HTTPSampler.contentEncoding"></stringProp> > > But none of it is working. This is the request I'm making (sanitised): > > > > URL: ${PATH_TO_SERVICE}/${ID}/category/${CAT_ID} > > > > BODY: > > { > > "id":"xxxxxxx", > > "name":"AUTOREGRESSION", > > "icon":"HOME", > > "Key" :"99949" > > } > > > > HEADERS: > > Content-Type : application/json > > Accept : application/json > > > > Does anyone know what the cause might be? Unfortunately, I can't post a > > working test plan because it contains confidential information. > > Not necessary; the test plan is not the problem here. > > > Thanks, > > Darren. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] <javascript:;> > For additional commands, e-mail: [email protected]<javascript:;> > > -- Cordialement. Philippe Mouawad.
