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 "Jaya Christina B." <bj...@mahindrabt.com> on 2005/07/06 12:38:48 UTC

Versioning problem(?): Cactus 1.4.1 with HttpClient V2.0 vs V3.0

Hi,
We are using Cactus 1.4.1 which uses HttpClientV2.0. for running JUnits
We now wanted to use <<HttpClientV3.0>> for our other classes for talking to
external systems.

When I try to replace <<commons-httpclient-2.0-rc2.jar>> with the version
<<commons-httpclient-3.0-rc2.jar>> 
for this version upgrade, while running Junits I get the following error. 
<snip>
java.lang.VerifyError: (class:
org/apache/cactus/client/HttpClientConnectionHelper, method: 
dispatch24_connect signature:
(Lorg/apache/cactus/WebRequest;)Ljava/net/HttpURLConnection;) Bad type in
putfield/putstatic
</snip>

If I use V3.0, no error occurs during Junits compilation. But only during
running the Junits, do I get this error.

Could you please let me know if I am missing something or if this is a known
error. 
If you could give me some pointers, it would be very useful & appreciated.

Thanks a lot.
 
Regards,
Jaya.
[MBT, India]


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


Re: Versioning problem(?): Cactus 1.4.1 with HttpClient V2.0 vs V3.0

Posted by Roland Weber <RO...@de.ibm.com>.
Hello Jaya,

> When I try to replace <<commons-httpclient-2.0-rc2.jar>> with the 
version
> <<commons-httpclient-3.0-rc2.jar>> 
> for this version upgrade, while running Junits I get the following 
error. 
> [...]
> If I use V3.0, no error occurs during Junits compilation. But only 
during
> running the Junits, do I get this error.

I am not quite sure what you are meaning with "If I use V3.0". Anyway,
HttpClient 3.0 is *not* a drop-in replacement for HttpClient 2.0. The API
has changed, that's why we changed the major version number.

If you want to use HttpClient 3.0 instead of HttpClient 2.0, you have to
compile your code against HC 3.0. If your code is using a library that
requires HC 2.0, but you want to use HC 3.0 directly, then you are out
of luck. Using HC 2.0 and 3.0 in the same classloader is not possible,
and using different classloaders for different parts of your code and
libraries is tricky and error-prone at best.

hope that helps,
  Roland


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