Hitting "Unable to load or invoke class: org.apache.jmeter.protocol.http.control.HC3CookieHandler" with bzt 1.9.2 and JMeter 3.2

760 views
Skip to first unread message

Jerry Wang

unread,
May 22, 2017, 2:44:19 AM5/22/17
to codename-taurus
Hi,

I'm hitting following error when running a YAML-based example test scenario with bzt 1.9.2 and JMeter 3.2:

2017-05-21 23:29:08,530 ERROR o.a.j.p.h.c.CookieManager: Unable to load or invoke class: org.apache.jmeter.protocol.http.control.HC3CookieHandler
org.apache.jorphan.util.JMeterException: java.lang.ClassNotFoundException: org.apache.jmeter.protocol.http.control.HC3CookieHandler
        at org.apache.jorphan.reflect.ClassTools.construct(ClassTools.java:92) ~[jorphan.jar:3.2 r1790748]
        at org.apache.jmeter.protocol.http.control.CookieManager.testStarted(CookieManager.java:415) [ApacheJMeter_http.jar:3.2 r1790748]
        at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:218) [ApacheJMeter_core.jar:3.2 r1790748]
        at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:388) [ApacheJMeter_core.jar:3.2 r1790748]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92]
Caused by: java.lang.ClassNotFoundException: org.apache.jmeter.protocol.http.control.HC3CookieHandler
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_92]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_92]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_92]
        at java.lang.Class.forName0(Native Method) ~[?:1.8.0_92]
        at java.lang.Class.forName(Class.java:264) ~[?:1.8.0_92]
        at org.apache.jorphan.reflect.ClassTools.construct(ClassTools.java:86) ~[jorphan.jar:3.2 r1790748]
        ... 4 more

My environment looks below:

2017-05-21 23:29:07,792 INFO o.a.j.u.JMeterUtils: Setting Locale to en_US
2017-05-21 23:29:07,807 INFO o.a.j.JMeter: Loading user properties from: /Users/wangz95/apache-jmeter-3.2/bin/user.properties
2017-05-21 23:29:07,808 INFO o.a.j.JMeter: Loading system properties from: /Users/wangz95/apache-jmeter-3.2/bin/system.properties
2017-05-21 23:29:07,809 INFO o.a.j.JMeter: Setting System properties from file: /Users/wangz95/2017-05-21_23-29-05.242167/system.properties
2017-05-21 23:29:07,816 INFO o.a.j.JMeter: Copyright (c) 1998-2017 The Apache Software Foundation
2017-05-21 23:29:07,816 INFO o.a.j.JMeter: Version 3.2 r1790748
2017-05-21 23:29:07,816 INFO o.a.j.JMeter: java.version=1.8.0_92
2017-05-21 23:29:07,816 INFO o.a.j.JMeter: java.vm.name=Java HotSpot(TM) 64-Bit Server VM
2017-05-21 23:29:07,816 INFO o.a.j.JMeter: os.name=Mac OS X
2017-05-21 23:29:07,816 INFO o.a.j.JMeter: os.arch=x86_64
2017-05-21 23:29:07,816 INFO o.a.j.JMeter: os.version=10.11.6
2017-05-21 23:29:07,816 INFO o.a.j.JMeter: file.encoding=UTF-8
2017-05-21 23:29:07,816 INFO o.a.j.JMeter: Max memory     =536870912
2017-05-21 23:29:07,816 INFO o.a.j.JMeter: Available Processors =4
2017-05-21 23:29:07,822 INFO o.a.j.JMeter: Default Locale=English (United States)
2017-05-21 23:29:07,822 INFO o.a.j.JMeter: JMeter  Locale=English (United States)
2017-05-21 23:29:07,823 INFO o.a.j.JMeter: JMeterHome=/Users/wangz95/apache-jmeter-3.2
2017-05-21 23:29:07,823 INFO o.a.j.JMeter: user.dir  =/Users/wangz95
2017-05-21 23:29:07,823 INFO o.a.j.JMeter: PWD       =/Users/wangz95

And the YAML file used is following:

execution:
  - concurrency: 5
     ramp-up: 20s
     hold-for: 2m
     scenario: TwoCheckout

scenarios:
  TwoCheckout:
      default-address: https://sandbox.2checkout.com/
      requests:
          - /
          - /gimme-404

Then I had a try with both JMeter 3.0 and JMeter 3.1 and they worked for me without this issue. So I guess this is an issue specific to JMeter 3.2, did anyone see this before? And how to fix it?

Andrey Pokhilko

unread,
May 22, 2017, 3:44:38 AM5/22/17
to codenam...@googlegroups.com

Hi,

Yes, in JMeter 3.2 they removed some of old deprecated classes. This is purely JMeter-side thing.


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.
--
You received this message because you are subscribed to the Google Groups "codename-taurus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codename-taur...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codename-taurus/0cc79f2a-44ad-48dc-9bee-f33c5ea63165%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ta...@blazemeter.com

unread,
May 22, 2017, 3:45:50 AM5/22/17
to codename-taurus
Hi, Jerry.
It's result of executing of the same modified_requests.jmx with different versions of jmeter. Do you think it can be connected with taurus?

---
Taras

Jerry Wang

unread,
May 22, 2017, 12:52:27 PM5/22/17
to codename-taurus, andrey....@contractor.ca.com
Thanks for the reply. Since I'm new to bzt, I just wanted to make sure this is a known issue.

Jerry Wang

unread,
May 22, 2017, 12:54:35 PM5/22/17
to codename-taurus
Taras,

No, like I said this is JMeter 3.2 specific. However, I cannot find anything on this in the doc or GitHub issue or by Googling.

chrisge...@googlemail.com

unread,
May 26, 2017, 3:28:53 AM5/26/17
to codename-taurus
It seems to me to be an incompatibility between jmeter 3.2 and taurus. This is sorta annoying as the docker container for taurus has jmeter 3.2, so I'm having to downgrade to 3.1 every time it runs through my jenkins pipeline.

Can this be corrected somehow in taurus?


Chris

ta...@blazemeter.com

unread,
May 29, 2017, 2:09:25 AM5/29/17
to codename-taurus, chrisge...@googlemail.com
Thanks for info, Chris. We'll discover it.
---

Taras

ta...@blazemeter.com

unread,
Jun 1, 2017, 1:42:03 AM6/1/17
to codename-taurus, chrisge...@googlemail.com
Hi. 
We sent the bug report to jmeter team and fix it on taurus side. Feel free to taste the latest taurus release from http://gettaurus.org/docs/DeveloperGuide/
---

Taras

On Friday, May 26, 2017 at 10:28:53 AM UTC+3, chrisge...@googlemail.com wrote:

boris.f...@t-systems.com

unread,
Jun 1, 2017, 8:12:03 AM6/1/17
to codename-taurus, chrisge...@googlemail.com
I'm experiencing the same problem with the taurus Docker container. I found a workaround by telling taurus that it should download and use jmeter 3.1 instead. Simply add this to your config:

modules:
  jmeter:
    path: ~/.bzt/jmeter31-taurus/bin/jmeter
    version: 3.1

dzavalei...@gmail.com

unread,
Jun 27, 2019, 8:56:46 AM6/27/19
to codename-taurus
Just in case someone faces this issue in JMeter 3.2, as this page is ranked pretty high let me share my solution:

Add followign after all occurances of <boolProp name="CookieManager.clearEachIteration">true</boolProp> in .jmx script file (even if they belong to disabled Cookie Managers!!!)
        <stringProp name="CookieManager.implementation">org.apache.jmeter.protocol.http.control.HC4CookieHandler</stringProp>:

<boolProp name="CookieManager.clearEachIteration">true</boolProp>
        <stringProp name="CookieManager.implementation">org.apache.jmeter.protocol.http.control.HC4CookieHandler</stringProp>

This basically gives a hint to JMeter 3.2 to use HC4CookieHandler, instead of HC3CookieHandler which seem to be default.

Best regards,
Dzmitry Zavalei
Reply all
Reply to author
Forward
0 new messages