Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: EE-1.8.2.GA_P03
-
Fix Version/s: EE-1.8.2.GA_P04
-
Component/s: Framework
-
Labels:None
-
Environment:Jetty 6.1.25
Description
We should consider changing the log severity from ERROR to DEBUG for the following exception (specific to JETTY) which has no functional impact. Full exception attached.
com.icesoft.faces.facelets.D2DFaceletViewHandler null - Problem in renderResponse: null
org.mortbay.jetty.EofException
at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:634)
at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:580)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
at com.icesoft.faces.context.NormalModeSerializer.serialize(NormalModeSerializer.java:109)
at com.icesoft.faces.context.BridgeFacesContext$SaveCurrentDocument.serialize(BridgeFacesContext.java:953)
at com.icesoft.faces.context.DOMResponseWriter.endDocument(DOMResponseWriter.java:180)
at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:284)
at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:155)
com.icesoft.faces.facelets.D2DFaceletViewHandler null - Problem in renderResponse: null
org.mortbay.jetty.EofException
at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:634)
at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:580)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
at com.icesoft.faces.context.NormalModeSerializer.serialize(NormalModeSerializer.java:109)
at com.icesoft.faces.context.BridgeFacesContext$SaveCurrentDocument.serialize(BridgeFacesContext.java:953)
at com.icesoft.faces.context.DOMResponseWriter.endDocument(DOMResponseWriter.java:180)
at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:284)
at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:155)
If it's still related to connections being closed prematurely, then in our NormalModeSerializer, we could make our catch statement more inclusive. Currently it's this flush call in the NormalModeSerializer that is irritating Jetty:
writer.flush();
{ log.debug("Browser closed the connection prematurely."); } else { throw e; }} catch (IOException e) {
//capture & log Tomcat specific exception
if (e.getClass().getName().endsWith("ClientAbortException"))
}
Since we are doing specific processing for Tomcat, we could do the same for Jetty. Either that or broaden it so that any IOException during flush() is handled as a premature connection closure. So the change would look something like this:
writer.flush();
} catch (IOException e) {
//capture & log Tomcat or Jetty specific exceptions
String exceptionName = e.getClass().getName();
if (exceptionName.endsWith("ClientAbortException") || exceptionName.endsWith("jetty.EofException")) { log.debug("Browser closed the connection prematurely."); }
else
{ throw e; }}