You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by awmurray <al...@lexisnexis.com> on 2017/12/18 16:12:00 UTC
DefaultHttpClient version conflict with OpenEJB
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
Re: DefaultHttpClient version conflict with OpenEJB
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi
tomee doesnt provide http client so likely needs more info to be able to
reproduce and understand what happens
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau>
2017-12-18 17:12 GMT+01:00 awmurray <al...@lexisnexis.com>:
> 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
>
Re: DefaultHttpClient version conflict with OpenEJB
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Probably the same with a jaxrs api in your app.
Le 19 déc. 2017 23:23, "awmurray" <al...@lexisnexis.com> a écrit :
> I found this problem- it was a difference in http-core that is now a
> problem
> because of the way the class loaders are working.
>
> I fixed this, but I think I have another problem with
> resteasy-jaxrs-2.3.6.Final.
>
> I'm getting a class cast excpetion:
> java.lang.ClassCastException: org.apache.cxf.jaxrs.impl.
> RuntimeDelegateImpl
> cannot be cast to org.jboss.resteasy.spi.ResteasyProviderFactory
>
> On:
>
> ResteasyProviderFactory.getInstance()
>
> Where should I look? Thanks for you help!
>
>
>
>
> --
> Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-
> f979441.html
>
Re: DefaultHttpClient version conflict with OpenEJB
Posted by awmurray <al...@lexisnexis.com>.
I found this problem- it was a difference in http-core that is now a problem
because of the way the class loaders are working.
I fixed this, but I think I have another problem with
resteasy-jaxrs-2.3.6.Final.
I'm getting a class cast excpetion:
java.lang.ClassCastException: org.apache.cxf.jaxrs.impl.RuntimeDelegateImpl
cannot be cast to org.jboss.resteasy.spi.ResteasyProviderFactory
On:
ResteasyProviderFactory.getInstance()
Where should I look? Thanks for you help!
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html