You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Kaushal Zagade <za...@gmail.com> on 2004/12/20 19:05:08 UTC

HTTPClient program on the cactus website

hi,

i am having a problem running the program from the HTTPCient tutorial
on the cactus website at this link:

http://jakarta.apache.org/commons/httpclient/3.0/tutorial.html

i have downloaded the commons-logging-api.jar and the
commons-httpclient-3.0.alpha2.jar and put them in the lib directory
and the classpath of my java project as mentioned.

it is giving me this error:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/codec/DecoderException
at org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethodBase.java:216)
at org.apache.commons.httpclient.methods.GetMethod.<init>(GetMethod.java:88)
at test.HTTPClientTutorial.main(HTTPClientTutorial.java:18)

=========

i have not changed the code even a single bit.

kaushal

RE: HTTPClient program on the cactus website

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Kaushal,

Don't download anything. Everything is bundled in the Cactus distribution.
Just use the version from there and everything should be alright.

Thanks
-Vincent

> -----Original Message-----
> From: Kaushal Zagade [mailto:zagade@gmail.com]
> Sent: lundi 20 décembre 2004 22:43
> To: Cactus Users List
> Subject: Re: HTTPClient program on the cactus website
> 
> thanks felipe,
> 
> i have got it running. but i had to comment out the following lines:
> 
> import org.apache.commons.httpclient.params.HttpMethodParams;
> // this package was not resolved
> 
> method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER,
>    		new DefaultHttpMethodRetryHandler(3, false));
> 
> and getParams() was in that class
> 
> do you know why this is happening. i have the
> commons-httpclient2.0-alpha2.jar as you told me to download.
> 
> kaushal
> 
> 
> On Mon, 20 Dec 2004 16:30:37 -0200, Felipe Leme <ma...@felipeal.net>
> wrote:
> > Kaushal,
> >
> > Cactus uses httpclient 2.0; please try that version instead.
> >
> > -- Felipe
> >
> >
> > On Mon, 2004-12-20 at 16:05, Kaushal Zagade wrote:
> >
> > > i have downloaded the commons-logging-api.jar and the
> > > commons-httpclient-3.0.alpha2.jar and put them in the lib directory
> > > and the classpath of my java project as mentioned.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



Re: HTTPClient program on the cactus website

Posted by Kaushal Zagade <za...@gmail.com>.
thanks felipe,

i have got it running. but i had to comment out the following lines:

import org.apache.commons.httpclient.params.HttpMethodParams;
// this package was not resolved

method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, 
   		new DefaultHttpMethodRetryHandler(3, false));

and getParams() was in that class

do you know why this is happening. i have the
commons-httpclient2.0-alpha2.jar as you told me to download.

kaushal


On Mon, 20 Dec 2004 16:30:37 -0200, Felipe Leme <ma...@felipeal.net> wrote:
> Kaushal,
> 
> Cactus uses httpclient 2.0; please try that version instead.
> 
> -- Felipe
> 
> 
> On Mon, 2004-12-20 at 16:05, Kaushal Zagade wrote:
> 
> > i have downloaded the commons-logging-api.jar and the
> > commons-httpclient-3.0.alpha2.jar and put them in the lib directory
> > and the classpath of my java project as mentioned.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
>

Re: HTTPClient program on the cactus website

Posted by Felipe Leme <ma...@felipeal.net>.
Kaushal,

Cactus uses httpclient 2.0; please try that version instead.

-- Felipe


On Mon, 2004-12-20 at 16:05, Kaushal Zagade wrote:

> i have downloaded the commons-logging-api.jar and the
> commons-httpclient-3.0.alpha2.jar and put them in the lib directory
> and the classpath of my java project as mentioned.