awmurray
2017-12-18 16:12:00 UTC
It looks like I have a conflict between my http-client jars and TomEE.
This line
org.apache.http.params.HttpParms = new
org.apache.http.params.BasicHttpParams();
org.apache.http.impl.clientDefaultHttpCLient httpClient = new
org.apache.http.impl.clientDefaultHttpCLient.DefaultHttpClient(clientConnectionManager,
params);
I dug up this exception in the debugger clearly showing a conflict, but I'm
not sure how to fix it:
java.lang.LinkageError: loader constraint violation: when resolving method
"org.apache.http.impl.client.DefaultHttpClient.<init>(Lorg/apache/http/conn/ClientConnectionManager;Lorg/apache/http/params/HttpParams;)V"
the class loader (instance of
org/apache/openejb/util/classloader/URLClassLoaderFirst) of the current
class, com/lxnx/cobra/rest/proxy/ClientFactory,
and the class loader (instance of java/net/URLClassLoader) for the method's
defining class,
org/apache/http/impl/client/DefaultHttpClient, have different Class objects
for the type org/apache/http/params/HttpParams used in the signature
I'm using httpclient-4.3.1.jar and httpcore-4.3.jar
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
This line
org.apache.http.params.HttpParms = new
org.apache.http.params.BasicHttpParams();
org.apache.http.impl.clientDefaultHttpCLient httpClient = new
org.apache.http.impl.clientDefaultHttpCLient.DefaultHttpClient(clientConnectionManager,
params);
I dug up this exception in the debugger clearly showing a conflict, but I'm
not sure how to fix it:
java.lang.LinkageError: loader constraint violation: when resolving method
"org.apache.http.impl.client.DefaultHttpClient.<init>(Lorg/apache/http/conn/ClientConnectionManager;Lorg/apache/http/params/HttpParams;)V"
the class loader (instance of
org/apache/openejb/util/classloader/URLClassLoaderFirst) of the current
class, com/lxnx/cobra/rest/proxy/ClientFactory,
and the class loader (instance of java/net/URLClassLoader) for the method's
defining class,
org/apache/http/impl/client/DefaultHttpClient, have different Class objects
for the type org/apache/http/params/HttpParams used in the signature
I'm using httpclient-4.3.1.jar and httpcore-4.3.jar
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html