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 Roland Weber <RO...@de.ibm.com> on 2005/08/22 07:32:06 UTC

re:Error using

Hi ergodic (or is it 7?),

ergodic 7 <er...@yahoo.com> wrote on 22.08.2005 04:51:55:

> Exception in thread "Thread-1"
> java.lang.NoSuchMethodError:
> 
org.apache.commons.httpclient.methods.GetMethod.getResponseContentLength()
> 
> The docs state that this function returns  -1 if no
> content length is available. Why is the exception
> thrown? All the required files are in my class path.

Could you be a little more specific about "all the required files"?
Which version of HttpClient are you using? Have you made sure that
the same version you compile against is present at runtime? Have you
made sure that only one version of HttpClient is present at runtime?

hope that helps,
  Roland


> My program works well once the line 
> 
> this.fileSize=getMethod.getResponseContentLength();
> 
> is not included.
> 
> Please note that no compile errors are generated.
> 
> Any help is apreciated
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> 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


re:Error using

Posted by ergodic 7 <er...@yahoo.com>.
OH thanks Roland,
  My oversight!

Regards

--- Roland Weber <RO...@de.ibm.com> wrote:

> Hi Ergodic,
> 
> > I am using version 3.0-rc3 of the httpclient
> > 
> > The libraries I have in my classpath include 
> >   commons-logging 1.04
> >   commons-httpclient 3.0-rc3
> > 
> > Are their any other dependancies I am missing?
> 
> Yes, you are missing commons-codec:
>
http://jakarta.apache.org/commons/httpclient/dependencies.html
> 
> 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
> 
> 



	
		
______________________________________________________
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/

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


re:Error using

Posted by Roland Weber <RO...@de.ibm.com>.
Hi Ergodic,

> I am using version 3.0-rc3 of the httpclient
> 
> The libraries I have in my classpath include 
>   commons-logging 1.04
>   commons-httpclient 3.0-rc3
> 
> Are their any other dependancies I am missing?

Yes, you are missing commons-codec:
http://jakarta.apache.org/commons/httpclient/dependencies.html

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


re:Error using

Posted by ergodic 7 <er...@yahoo.com>.
Hello
  Sorry for the dealy

I am using version 3.0-rc3 of the httpclient

The libraries I have in my classpath include 
  commons-logging 1.04
  commons-httpclient 3.0-rc3

Are their any other dependancies I am missing?

Thanks alot for you assistance

ergodic


--- Roland Weber <RO...@de.ibm.com> wrote:

> Hi ergodic (or is it 7?),
> 
> ergodic 7 <er...@yahoo.com> wrote on 22.08.2005
> 04:51:55:
> 
> > Exception in thread "Thread-1"
> > java.lang.NoSuchMethodError:
> > 
>
org.apache.commons.httpclient.methods.GetMethod.getResponseContentLength()
> > 
> > The docs state that this function returns  -1 if
> no
> > content length is available. Why is the exception
> > thrown? All the required files are in my class
> path.
> 
> Could you be a little more specific about "all the
> required files"?
> Which version of HttpClient are you using? Have you
> made sure that
> the same version you compile against is present at
> runtime? Have you
> made sure that only one version of HttpClient is
> present at runtime?
> 
> hope that helps,
>   Roland
> 
> 
> > My program works well once the line 
> > 
> >
> this.fileSize=getMethod.getResponseContentLength();
> > 
> > is not included.
> > 
> > Please note that no compile errors are generated.
> > 
> > Any help is apreciated
> > 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> > http://mail.yahoo.com 
> > 
> >
>
---------------------------------------------------------------------
> > 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
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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