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

        Tyler Johnson created issue -
        Tyler Johnson made changes -
        Field Original Value New Value
        Attachment EofException.txt [ 13675 ]
        Tyler Johnson made changes -
        Salesforce Case [5007000000GD0vM]
        Tyler Johnson made changes -
        Environment - Jetty 6.1.25
        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; } }
        Tyler Johnson made changes -
        Attachment EofException.txt [ 13675 ]
        Ken Fyten made changes -
        Fix Version/s EE-1.8.2.GA_P04 [ 10280 ]
        Assignee Priority P2
        Assignee Deryk Sinotte [ deryk.sinotte ]
        Ken Fyten made changes -
        Assignee Priority P2 P1
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #28569 Wed Mar 28 11:23:14 MDT 2012 deryk.sinotte ICE-7354: look for and log debug level messages for Jetty EOF exceptions similar to what we already do for Tomcat
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/NormalModeSerializer.java
        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;
        Deryk Sinotte made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1

          People

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

            Dates

            • Created:
              Updated:
              Resolved: