File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes java.io.IOException:Broken pipe Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "java.io.IOException:Broken pipe" Watch "java.io.IOException:Broken pipe" New topic
Author

java.io.IOException:Broken pipe

Rajeev Bakhru
Greenhorn

Joined: Jun 21, 2001
Posts: 28
Hi All,
I am using Servlet and JSP , where a req is fwd'ed from servlet to JSP on weblogic and Oracle database. In one of my search servlet which has lot of preparedStatement and ResultSet
i am getting this error
java.io.IOException: Broken pipe
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
at weblogic.servlet.internal.ChunkUtils.writeHeaderChunk(ChunkUtils.java:151)
at weblogic.servlet.internal.ResponseHeaders.writeHeaders(ResponseHeaders.java:349)
at weblogic.servlet.internal.ServletResponseImpl.writeHeaders(ServletResponseImpl.java:806)
at weblogic.servlet.internal.ServletOutputStreamImpl.flush(ServletOutputStreamImpl.java:139)
at weblogic.servlet.internal.ServletOutputStreamImpl.flushWithCheck(ServletOutputStreamImpl.java:432)
at weblogic.servlet.internal.ServletOutputStreamImpl.checkForFlush(ServletOutputStreamImpl.java:568)
at weblogic.servlet.internal.ServletOutputStreamImpl.print(ServletOutputStreamImpl.java:234)
at weblogic.servlet.jsp.JspWriterImpl.print(JspWriterImpl.java:147)
at jsp_servlet._dealError._jspService(_dealError.java:89)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:245)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:327)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:207)
at dealServlet.ShowPage(dealServlet.java:25)
at dealServlet.dtBaseService(dealServlet.java:277)
at dealServlet.doPost(dealServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:245)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2279)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1923)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Any idea, guys
I checked the forums, some say its problem with the Connection pool in weblogic or same say it happens due to the size of JSP file
Please help me if anybody have idea
Thanks
Rajeev
[ April 02, 2002: Message edited by: Rajeev Bakhru ]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
How about the browser closed the connection due to a time-out? Is that reasonable in terms of the delay? If so maybe you need to send a "working" page and have the database work done in another thread.
Bill
Rajeev Bakhru
Greenhorn

Joined: Jun 21, 2001
Posts: 28
Hi William
I don't think its the browser time out . Can you tell me how to go ahead ... as I have a servlet which calls the JSP on success and have lot of Prepared Statement and Result Set. What could be the specific problem. BTY, I am using Request Dispather for fwding the request to the JSP.
Thanks
Rajeev
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
How much time are we talking about here?
Does your JSP send any text at all before starting into the time consuming process?
What do you finally see on the browser side?
Bill
Rajeev Bakhru
Greenhorn

Joined: Jun 21, 2001
Posts: 28
Hi
Actually ther is no problem in display of data on JSP ....it displays all the results set properly on the browser, this error i saw on weblogic log file so it concerns to me .....
Thanks
Rajeev
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
Does your JSP close the output stream when finished?
Bill
Rajeev Bakhru
Greenhorn

Joined: Jun 21, 2001
Posts: 28
How to check whether outputstream is closed or not
Yesterday , i tried to debug the jsp when i commented all the code in jsp with ony a plain text inside that , it did'nt gave any error.
Actually JSP has lot of "if loops " for Vector and Hashtable coming from the servlet , i think thats creating a problem somewhere ....is it due to any buffer size.
Thanks for your help
Rajeev
 
Don't get me started about those stupid light bulbs.
 
subject: java.io.IOException:Broken pipe