You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by "Khokhani, Kanan" <Ka...@dowjones.com> on 2005/01/06 20:57:03 UTC

Clash with older version

I am using using httpclient verison 2.0, which requires
commons-codec.jar.

Our main application is using older verison of httpclient requiring
commons-codec-1.1.jar.

Now when my class tries to access some of the classes from codec.jar, it
finds the older version and throws class not found exception for
URLCodec class.

Any one knows how I can go about this problem

kanan


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Re: Clash with older version

Posted by Oleg Kalnichevski <ol...@apache.org>.
Kanan,

HttpClient 2.x has only one runtime dependency which is commons-logging.
commons-codec 1.2 is required by HttpClient as of version 3.x only. To
my best knowledge commons-code 1.2 is fully backward compatible with
version 1.1. So, you might want to simply replace the jar shipped with
the main application with a newer release of commons-codec.

In general the problem you are experiencing (known as jar hell akin to
notorious DDL hell) is solved using a custom class loader. You may want
to search publicly accessible resources on this topic. 

Hope this helps,

Oleg


On Thu, 2005-01-06 at 14:57 -0500, Khokhani, Kanan wrote: 
> I am using using httpclient verison 2.0, which requires
> commons-codec.jar.
> 
> Our main application is using older verison of httpclient requiring
> commons-codec-1.1.jar.
> 
> Now when my class tries to access some of the classes from codec.jar, it
> finds the older version and throws class not found exception for
> URLCodec class.
> 
> Any one knows how I can go about this problem
> 
> kanan
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org