Apache jmeter - 2.10 - Null point exception while running an existing script

£可爱£侵袭症+ 提交于 2019-12-24 11:44:25

问题


The Jmeter script runs fine on apache-jmeter2.8. I upgraded recently to apache-jmeter-2.10 and I started getting Null Point exception.

I revert back to apache-jmeter2.8 and the script works fine.

        java.lang.NullPointerException
at org.apache.jorphan.util.JOrphanUtils.replaceAllChars(JOrphanUtils.java:264)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.encodeSpaces(HTTPSamplerBase.java:1332)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.followRedirects(HTTPSamplerBase.java:1404)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.resultProcessing(HTTPSamplerBase.java:1482)
at org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.resultProcessing(HTTPAbstractImpl.java:306)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:381)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1105)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1094)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:429)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
at java.lang.Thread.run(Unknown Source)

The script is general login script and the failure happens when it is trying to post.

Let me know if you need more info.


回答1:


You may be facing this known bug that has been fixed in nightly build:

  • https://issues.apache.org/bugzilla/show_bug.cgi?id=55717

As a workaround, try changing http implementation to Java instead of HttpClient4 implementation.

If you want to give nightly build a try, see:

http://jmeter.apache.org/nightly.html

Read:

Installing JMeter runtime

Download the _bin and _lib files

Unpack the archives into the same directory structure

The other archives are not needed to run JMeter.




回答2:


The above error has been addressed in 2.11 version. Download and use the latest version of jmeter 2.11 and check out your script.

No need to go for Nightly Build.



来源:https://stackoverflow.com/questions/20199383/apache-jmeter-2-10-null-point-exception-while-running-an-existing-script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!