You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Salman, Cemal (cundus AG)" <ce...@cundus.de> on 2004/07/09 16:06:24 UTC

FW: Exception: org.apache.commons.httpclient.ProtocolException: Unbuffered entity enclosing request can not be repeated

Hello,

can anyone help me??


-----Original Message-----
From:	Salman, Cemal (cundus AG)
Sent:	Fri 7/9/2004 13:02
To:	oleg@ural.ru; jsdever@apache.org
Cc:	
Subject:	FW: Exception: org.apache.commons.httpclient.ProtocolException: Unbuffered entity enclosing request can not be repeated
Hi,

I forget to attach the class file and error message.
Sorry.


Cemal


-----Original Message-----
From:	Salman, Cemal (cundus AG)
Sent:	Fri 7/9/2004 11:46
To:	oleg@ural.ru; jsdever@apache.org
Cc:	
Subject:	Exception: org.apache.commons.httpclient.ProtocolException: Unbuffered entity enclosing request can not be repeated
Dear Oleg Kalnichevski, Daer Jeff Dever,

i have since last 2 weeks a problem.
I' m using the apache/httpclient package (release currently used: commons-httpclient-3.0-alpha1) to handle the communication with a server over a network.

I already get the follopwing error:
"org.apache.commons.httpclient.ProtocolException: Unbuffered entity enclosing request can not be repeated."

What does it mean????

I attached this mail the class file, which implements the communication.
Implementation is nested in the method 
"
private static HttpMethod sendSOAPMessage(String uri, File file, FrameModel frameModel) throws IOException 
".

Can you help me???

I need very fast a solution to fix this problem.


The problem occured also with with release commons-httpclient-2.0.


Kind regards
Cemal Salman




Re: FW: Exception: org.apache.commons.httpclient.ProtocolException: Unbuffered entity enclosing request can not be repeated

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

Well, it's kind of not easy to add to what's already been said by the
error message: entity enclosing methods (such as PUT & POST) cannot be
repeated if the content of the request body is not buffered. In other
words, if the request body is being streamed out (that is, read directly
from an input stream) HttpClient will be unable to automatically recover
from errors such as authentication failure or I/O failure that requires
to retry the request

There are three options to solve the problem:

(1) buffer the request
(2) ensure that the request does not need to be repeated
(3) handle authentication and I/O errors manually and re-instantiate the
input stream prior to retrying the method

The second option is usually the preferred one. Activate the wire/debug
logging, see what made the first attempt to execute the method fail and
see what can be done to fix it

Hope this helps

Oleg


On Fri, 2004-07-09 at 16:06, Salman, Cemal (cundus AG) wrote:
> Hello,
> 
> can anyone help me??
> 
> 
> -----Original Message-----
> From:	Salman, Cemal (cundus AG)
> Sent:	Fri 7/9/2004 13:02
> To:	oleg@ural.ru; jsdever@apache.org
> Cc:	
> Subject:	FW: Exception: org.apache.commons.httpclient.ProtocolException: Unbuffered entity enclosing request can not be repeated
> Hi,
> 
> I forget to attach the class file and error message.
> Sorry.
> 
> 
> Cemal
> 
> 
> -----Original Message-----
> From:	Salman, Cemal (cundus AG)
> Sent:	Fri 7/9/2004 11:46
> To:	oleg@ural.ru; jsdever@apache.org
> Cc:	
> Subject:	Exception: org.apache.commons.httpclient.ProtocolException: Unbuffered entity enclosing request can not be repeated
> Dear Oleg Kalnichevski, Daer Jeff Dever,
> 
> i have since last 2 weeks a problem.
> I' m using the apache/httpclient package (release currently used: commons-httpclient-3.0-alpha1) to handle the communication with a server over a network.
> 
> I already get the follopwing error:
> "org.apache.commons.httpclient.ProtocolException: Unbuffered entity enclosing request can not be repeated."
> 
> What does it mean????
> 
> I attached this mail the class file, which implements the communication.
> Implementation is nested in the method 
> "
> private static HttpMethod sendSOAPMessage(String uri, File file, FrameModel frameModel) throws IOException 
> ".
> 
> Can you help me???
> 
> I need very fast a solution to fix this problem.
> 
> 
> The problem occured also with with release commons-httpclient-2.0.
> 
> 
> Kind regards
> Cemal Salman
> 
> 
> 
> 
> ______________________________________________________________________
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


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