Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Flushing output streams

0 views
Skip to first unread message

Mohamed Itani

unread,
Jun 4, 2002, 11:09:05 AM6/4/02
to
Hello,

I was a getting a harmlous excpetion :

<4/06/2002 16:48:04> <Error> <HTTP> <Servlet execution in servlet context "WebAppServletContext(5985988,root,/root)" failed, java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '7358
4' bytes instead of stated: '94440' bytes.
java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '73584' bytes instead of stated: '94440' bytes.
        at weblogic.servlet.internal.ServletOutputStreamImpl.finish(ServletOutputStreamImpl.java:413)
        at weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:974)
        at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1964)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

I read about it on this newsgroup, and I saw some people suggesting to flush the output streams with ( out.flush()).

But this is weird, doesn't Weblogic flush the output streams by itself??
I had the same application running on tomcat before and everything was fine, I didn't have to flush the output streams with tomcat

And what is the consequence of not flushing the output streams.

Thanks guys
Itani
 

Vinod Mehra

unread,
Jun 4, 2002, 1:01:07 PM6/4/02
to
No flush will not help here.
 
This exception will show up in only two cases:
 
1. You wrote less than the promised content length was.
 
2. While you were writing the client terminated the connection. I remember we used
   to throw this ProtocolException exception at the end, which was unnecessary.
   I know this problem has been fixed. We don't throw this exception anymore
   when the client abnormally terminates the connection. I believe the problem has
   been fixed in 610sp2. Which release/service pack are you using? If you
   can't upgrade and need a one off patch please contact support. CR057091
   was used to track this problem. One off patches are available for 610sp1 and
   510sp12.
 
Cheers!
--Vinod.

Luca

unread,
Jun 7, 2002, 11:10:20 AM6/7/02
to
I have the same problem. I have seen a lot of messages reporting this
problem... what is the right solution? Can weblogic become instable
due to this condition?

I use some Oreilly classes (com.oreilly.servlet.MultipartRequest) to
intercept some POST data; Is there anyone who knows if these classes
can cause the ProtocolException problem?
Bye

Luca

"Vinod Mehra" <vme...@bea.com> wrote in message news:<3cfcf200$1...@newsgroups2.bea.com>...

> --

0 new messages