This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Relevant snip of stack trace is: Servlet failed with Exception java.lang.RuntimeException: IOException occured at weblogic.servlet.internal.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:178) at weblogic.servlet.internal.WLOutputStreamWriter.write(WLOutputStreamWriter.java:99) at weblogic.servlet.internal.WLOutputStreamWriter.write(WLOutputStreamWriter.java:111) at java.io.PrintWriter.write(PrintWriter.java:208) at java.io.PrintWriter.write(PrintWriter.java:224) at java.io.PrintWriter.print(PrintWriter.java:369) at com.myCode.servlet.myServlet.doGet(myServlet.java:282) Line 282 in myServlet is the one above: out.print(completeDoc); Now this happens once in ~1000 accesses to this servlet. While I will be adding code to catch the IOException and print details, I was hoping if someone could point me towards possible issues. Also, perhaps it might be more correct to convert this statement to: out.print(completeDoc.toString());
I don't know why but I like to know the reason too.
sameerleekha
Greenhorn
Joined: Jan 22, 2002
Posts: 26
posted
0
Hi, Try to set the content type before getting the writer object. response.setContentType("text/html")
sameer
Sharad Agarwal
Ranch Hand
Joined: Sep 11, 2002
Posts: 167
posted
0
Hi All (especially Sai Prasad), Sorry for the late response. This had been put on the back burner for quite some time. We found out the issue. This Exception is logged by Weblogic whenever the end customer hits 'escape' or 'stop' in the browser before the page is loaded. I guess the connection gets terminated and consequently the servlet throws an IOException. Note that this is WL5.1, this might have been 'fixed' in later versions. Hope this helps, Sharad Agarwal
Chris Mathews
Ranch Hand
Joined: Jul 18, 2001
Posts: 2712
posted
0
Originally posted by Sharad Agarwal: Hi All (especially Sai Prasad), Sorry for the late response. This had been put on the back burner for quite some time. We found out the issue. This Exception is logged by Weblogic whenever the end customer hits 'escape' or 'stop' in the browser before the page is loaded. I guess the connection gets terminated and consequently the servlet throws an IOException. Note that this is WL5.1, this might have been 'fixed' in later versions. Hope this helps, Sharad Agarwal
I remember this problem from WLS 4.x, however I didn't put the two together when you originally posted. Regardless, this problem has been fixed in WLS 6.x and greater.