hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Natarajan_Va...@emc.com
Subject RE: stream corruption
Date Wed, 21 Jan 2009 18:20:38 GMT
Raymond,

Thanks for reply.

1. Yes & no. The problem re-occurs but things work fine when we resend
failed request. So, there is no testcase or data that reproduce the
problem as needed.
2. I tried to buffer & dump content on server side before calling
ObjectInputStream and readObject in order to see content of malformed
stream. Unfortunately, the problem did not occur or at least the problem
is delayed for hours...

Additional information is, we use MultiThreadedHttpConnectionManager on
client side.

Thanks
Valli

-----Original Message-----
From: raykroeker@gmail.com [mailto:raykroeker@gmail.com] On Behalf Of
Raymond Kroeker
Sent: Wednesday, January 21, 2009 10:07 AM
To: HttpClient User Discussion
Subject: Re: stream corruption

Hi Natarajan,
    I've been using hc 3.0.1 for a long while and have never noticed
this issue.  I have a couple of questions.

1.  Can you reproduce the event that causes the error?
2.  Can you see what the content of the malformed stream is?

    If neither of these is true I would suggest that you persist the
request content such that when the error occurs you can troubleshoot
the problem and ask better questions.

Raymond

On Wed, Jan 21, 2009 at 09:02,  <Natarajan_Valli@emc.com> wrote:
> We use HttpClient version 3.0.1 and recently noticed stream
corruption.
> The corruption is noticed on server side when the server (webapp
running
> in Jboss server) receives those requests. We believe that at some
point
> content of 2 requests are mixed. Is that possible? The problem is very
> intermittent but happens very often.
>
>
>
> Here is the code snippet that receives the stream on server side
>
>
>
>                    ObjectInputStream reqStream = new
> ObjectInputStream(httpServletReq.getInputStream());
>
>                    return (IRequest) reqStream.readObject();
>
>
>
>
>
> exception returned by this when problem occurs
>
>
>
> java.lang.NullPointerException
>
>                at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1820)
>
>                at
>
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719
> )
>
>                at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
>
>                at
>
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
>
>                at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
>
>                at
>
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719
> )
>
>                at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
>
>                at
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
>
>
>
> Any idea to resolve this problem is highly appreciated!
>
>
>
> Thanks
>
> Valli
>
>
>
>



-- 
---------------------------------------------------------
Raymond Kroeker

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



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


Mime
View raw message