Bug 59193 - ant run_gui fails with java.lang.ClassNotFoundException or java.lang.IllegalAccessError when accessing classes from dependencies not loaded through Thread.currentThread().getContextClassLoader()
Summary: ant run_gui fails with java.lang.ClassNotFoundException or java.lang.Illeg...
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.13
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-17 19:57 UTC by Philippe Mouawad
Modified: 2016-03-17 20:00 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Mouawad 2016-03-17 19:57:21 UTC
2016/03/17 19:04:07 ERROR - jmeter.threads.JMeterThread: Test failed! java.lang.IllegalAccessError: tried to access class org.apache.http.impl.conn.HttpConnPool from class org.apache.http.impl.conn.JMeterPoolingClientConnectionManager
    at org.apache.http.impl.conn.JMeterPoolingClientConnectionManager.<init>(JMeterPoolingClientConnectionManager.java:111)
    at org.apache.jmeter.protocol.http.sampler.MeasuringConnectionManager.<init>(MeasuringConnectionManager.java:59)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.setupClient(HTTPHC4Impl.java:724)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:274)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1143)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1132)
    at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:465)
    at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:410)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:241)
    at java.lang.Thread.run(Thread.java:745)

I also get this one before If my plan contains a CookieManager:
2016/03/17 20:42:20 ERROR - jmeter.protocol.http.control.CookieManager: Unable to load or invoke class: org.apache.jmeter.protocol.http.control.HC4CookieHandler org.apache.jorphan.util.JMeterException: java.lang.ClassNotFoundException: org.apache.jmeter.protocol.http.control.HC4CookieHandler
    at org.apache.jorphan.reflect.ClassTools.construct(ClassTools.java:92)
    at org.apache.jmeter.protocol.http.control.CookieManager.testStarted(CookieManager.java:417)
    at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:203)
    at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:324)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.apache.jmeter.protocol.http.control.HC4CookieHandler
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:191)
    at org.apache.jorphan.reflect.ClassTools.construct(ClassTools.java:86)
    ... 4 more
Comment 1 Philippe Mouawad 2016-03-17 20:00:09 UTC
Author: pmouawad
Date: Thu Mar 17 19:59:52 2016
New Revision: 1735483

URL: http://svn.apache.org/viewvc?rev=1735483&view=rev
Log:
Bug 59193 - ant run_gui fails with java.lang.ClassNotFoundException or java.lang.IllegalAccessError when accessing classes from dependencies not loaded through Thread.currentThread().getContextClassLoader()
Bugzilla Id: 59193

Modified:
    jmeter/trunk/build.xml
    jmeter/trunk/xdocs/changes.xml