繁体   English   中英

Could not initialize class org.apache.jmeter.protocol.http.parser.CssParser - JMeter

[英]Could not initialize class org.apache.jmeter.protocol.http.parser.CssParser - JMeter

我正在尝试在 Apache JMeter 5.2 上运行 LoadTest,当我尝试运行测试时,它向我显示此错误 =>

java.lang.NoClassDefFoundError: Could not initialize class org.apache.jmeter.protocol.http.parser.CssParser
    at java.lang.Class.forName0(Native Method) ~[?:?]
    at java.lang.Class.forName(Class.java:315) ~[?:?]
    at org.apache.jmeter.protocol.http.parser.BaseParser.getParser(BaseParser.java:66) ~[ApacheJMeter_http.jar:5.2]
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.getParser(HTTPSamplerBase.java:1481) ~[ApacheJMeter_http.jar:5.2]
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.downloadPageResources(HTTPSamplerBase.java:1332) ~[ApacheJMeter_http.jar:5.2]
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.resultProcessing(HTTPSamplerBase.java:1749) ~[ApacheJMeter_http.jar:5.2]
    at org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.resultProcessing(HTTPAbstractImpl.java:556) ~[ApacheJMeter_http.jar:5.2]
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:648) ~[ApacheJMeter_http.jar:5.2]
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:67) ~[ApacheJMeter_http.jar:5.2]
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.downloadPageResources(HTTPSamplerBase.java:1417) ~[ApacheJMeter_http.jar:5.2]
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.resultProcessing(HTTPSamplerBase.java:1749) ~[ApacheJMeter_http.jar:5.2]
    at org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.resultProcessing(HTTPAbstractImpl.java:556) ~[ApacheJMeter_http.jar:5.2]
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:648) ~[ApacheJMeter_http.jar:5.2]
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:67) ~[ApacheJMeter_http.jar:5.2]
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1282) ~[ApacheJMeter_http.jar:5.2]
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1271) ~[ApacheJMeter_http.jar:5.2]
    at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:627) ~[ApacheJMeter_core.jar:5.2]
    at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:551) ~[ApacheJMeter_core.jar:5.2]
    at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:490) ~[ApacheJMeter_core.jar:5.2]
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257) ~[ApacheJMeter_core.jar:5.2]
    at java.lang.Thread.run(Thread.java:834) [?:?]

可能是什么原因? 谢谢!

Most probably your JMeter installation got corrupt somehow, try uninstalling jmeter - HTTP Protocol Support component using JMeter Plugins Manager and then reinstall it back

在此处输入图像描述

它应该可以解决您的安装问题。


Also be aware that according to JMeter Best Practices you should always be using the latest version of JMeter so given your current JMeter installation is broken it's probably a good time to upgrade to JMeter 5.3 (or whatever is the latest stable version available at JMeter Downloads page )

我已经通过在每次测试中重新配置 HTTP 请求来修复它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM