ICEfaces
  1. ICEfaces
  2. ICE-7354

org.mortbay.jetty.EofException should be logged as DEBUG

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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)

        Activity

        Hide
        Deryk Sinotte added a comment -

        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();
        } catch (IOException e) {
        //capture & log Tomcat specific exception
        if (e.getClass().getName().endsWith("ClientAbortException"))

        { log.debug("Browser closed the connection prematurely."); } else { throw e; }
        }

        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; }

        }

        Show
        Deryk Sinotte added a comment - 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(); } catch (IOException e) { //capture & log Tomcat specific exception if (e.getClass().getName().endsWith("ClientAbortException")) { log.debug("Browser closed the connection prematurely."); } else { throw e; } } 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; } }
        Hide
        Deryk Sinotte added a comment -

        Checked in the code change that checks for Jetty EOF exceptions in much the same way we check for Tomcat specific exceptions and log them as DEBUG:

        Index: core/src/com/icesoft/faces/context/NormalModeSerializer.java
        ===================================================================
        — core/src/com/icesoft/faces/context/NormalModeSerializer.java (revision 28566)
        +++ core/src/com/icesoft/faces/context/NormalModeSerializer.java (revision )
        @@ -108,8 +108,9 @@

        writer.flush();
        } catch (IOException e) {

        • //capture & log Tomcat specific exception
        • if (e.getClass().getName().endsWith("ClientAbortException")) {
          + //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;

        Show
        Deryk Sinotte added a comment - Checked in the code change that checks for Jetty EOF exceptions in much the same way we check for Tomcat specific exceptions and log them as DEBUG: Index: core/src/com/icesoft/faces/context/NormalModeSerializer.java =================================================================== — core/src/com/icesoft/faces/context/NormalModeSerializer.java (revision 28566) +++ core/src/com/icesoft/faces/context/NormalModeSerializer.java (revision ) @@ -108,8 +108,9 @@ writer.flush(); } catch (IOException e) { //capture & log Tomcat specific exception if (e.getClass().getName().endsWith("ClientAbortException")) { + //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;

          People

          • Assignee:
            Deryk Sinotte
            Reporter:
            Tyler Johnson
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: