Denu Lemos
Denu Lemos

Reputation: 83

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

I am trying to run a LoadTest on Apache JMeter 5.2, when i try to run the test, it shows me this error =>

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) [?:?]

What could be the reason? Thanks!

Upvotes: 0

Views: 736

Answers (2)

Denu Lemos
Denu Lemos

Reputation: 83

I´ve fixed it by reconfiguring the HTTP Request on each test.

Upvotes: 0

Dmitri T
Dmitri T

Reputation: 168002

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

enter image description here

it should fix your installation issue.


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)

Upvotes: 1

Related Questions