ICEfaces
  1. ICEfaces
  2. ICE-6783

IllegalStateException thrown in Jetty 6.1.25

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2-EE-GA_P02
    • Fix Version/s: EE-1.8.2.GA_P03
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Jetty 6.1.25

      Description

      If ICEfaces tries to touch an already expired session to shut it down, the following is output to the server logs:

      Apr 7, 2011 1:52:47 PM com.icesoft.faces.webapp.http.servlet.SessionDispatcher notifySessionShutdown
      Apr 7, 2011 1:52:47 PM com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Monitor shutdown
      INFO: Session already invalidated.

      However on Jetty 6.1.25, a SEVERE: java.lang.IllegalStateException is also thrown even the log level is set at WARN. Although there appears to be no functional impact, the logging can be cause for concern. The attached test application will cause this exception to occur on Jetty. Simply drop the test case in the webapps folder in Jetty and the click login/logout button in the application.

        Activity

        Tyler Johnson created issue -
        Tyler Johnson made changes -
        Field Original Value New Value
        Salesforce Case [5007000000GCkb3]
        Tyler Johnson made changes -
        Attachment sc9993.war [ 13089 ]
        Tyler Johnson made changes -
        Description If ICEfaces tries to touch an already expired session to shut it down, the following is output to the server logs:

        Apr 7, 2011 1:52:47 PM com.icesoft.faces.webapp.http.servlet.SessionDispatcher notifySessionShutdown
        Apr 7, 2011 1:52:47 PM com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Monitor shutdown
        INFO: Session already invalidated.

        However on Jetty 6.1.25, a SEVERE: java.lang.IllegalStateException is also thrown and although there appears to be no functional impact, the logging can be cause for concern. The attached test application will cause this exception to occur on Jetty. Simply drop the test case in the webapps folder in Jetty and the click login/logout button in the application.

        If ICEfaces tries to touch an already expired session to shut it down, the following is output to the server logs:

        Apr 7, 2011 1:52:47 PM com.icesoft.faces.webapp.http.servlet.SessionDispatcher notifySessionShutdown
        Apr 7, 2011 1:52:47 PM com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Monitor shutdown
        INFO: Session already invalidated.

        However on Jetty 6.1.25, a SEVERE: java.lang.IllegalStateException is also thrown even the log level is set at WARN. Although there appears to be no functional impact, the logging can be cause for concern. The attached test application will cause this exception to occur on Jetty. Simply drop the test case in the webapps folder in Jetty and the click login/logout button in the application.
        Tyler Johnson made changes -
        Attachment sc9993.war [ 13089 ]
        Tyler Johnson made changes -
        Attachment sc9993.war [ 13095 ]
        Tyler Johnson made changes -
        Attachment sc9993.war [ 13095 ]
        Tyler Johnson made changes -
        Attachment sc9993.war [ 13096 ]
        Ken Fyten made changes -
        Assignee Ted Goddard [ ted.goddard ]
        Hide
        Ted Goddard added a comment -

        I have deployed the sample .war file to Jetty 6.1.25 and only see the following upon logout:

        logout
        sessionDestroyed 1v6kw2z2wha5s1g2ayteukryd6: Wed Apr 27 11:36:23 MDT 2011
        sessionDestroyed: end
        sessionCreated 14c7mktbxs0px1saunrramq0ox: Wed Apr 27 11:36:23 MDT 2011

        Does the Exception only occur occasionally?

        Show
        Ted Goddard added a comment - I have deployed the sample .war file to Jetty 6.1.25 and only see the following upon logout: logout sessionDestroyed 1v6kw2z2wha5s1g2ayteukryd6: Wed Apr 27 11:36:23 MDT 2011 sessionDestroyed: end sessionCreated 14c7mktbxs0px1saunrramq0ox: Wed Apr 27 11:36:23 MDT 2011 Does the Exception only occur occasionally?
        Hide
        Ted Goddard added a comment -

        Assigning to Tyler for additional instructions on how to reproduce.

        Show
        Ted Goddard added a comment - Assigning to Tyler for additional instructions on how to reproduce.
        Ted Goddard made changes -
        Assignee Ted Goddard [ ted.goddard ] Tyler Johnson [ tyler.johnson ]
        Hide
        Ted Goddard added a comment -

        Please include the full stack trace in the comments here.

        Show
        Ted Goddard added a comment - Please include the full stack trace in the comments here.
        Hide
        Ted Goddard added a comment -

        I have reproduced this on Mac OS X as well, it's just highly transient. Exceptions during session shutdown do not need to be logged to "info" or "error" since there is no action to be taken by the application administrator, Exceptions at this time are normal due to network errors and timing conditions, and the Exception does not indicate any functional impact.

        Show
        Ted Goddard added a comment - I have reproduced this on Mac OS X as well, it's just highly transient. Exceptions during session shutdown do not need to be logged to "info" or "error" since there is no action to be taken by the application administrator, Exceptions at this time are normal due to network errors and timing conditions, and the Exception does not indicate any functional impact.
        Hide
        Ted Goddard added a comment - - edited

        The following Exception is also observed:

        java.lang.RuntimeException: wrapped Exception: java.lang.IllegalStateException
        at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:211)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:55)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:398)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
        at org.mortbay.jetty.nio.SelectChannelConnector$RetryContinuation.run(SelectChannelConnector.java:525)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

        Since Jetty uses Exception processing to implement continuations, it will not be possible to simply consume the above Exception. Also, an IllegalStateException could occur within application code and should be reported. If the root cause of the above can be determined, it should be possible eliminate it from the logs as well.

        Show
        Ted Goddard added a comment - - edited The following Exception is also observed: java.lang.RuntimeException: wrapped Exception: java.lang.IllegalStateException at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:211) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:55) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:398) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) at org.mortbay.jetty.nio.SelectChannelConnector$RetryContinuation.run(SelectChannelConnector.java:525) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) Since Jetty uses Exception processing to implement continuations, it will not be possible to simply consume the above Exception. Also, an IllegalStateException could occur within application code and should be reported. If the root cause of the above can be determined, it should be possible eliminate it from the logs as well.
        Hide
        Ted Goddard added a comment -

        The root cause of the above exception is due to an Exception being thrown during checkSession(). The Excpetion prevents further processing during an expired session.

        java.lang.IllegalStateException
        at org.mortbay.jetty.servlet.AbstractSessionManager$Session.setAttribute(AbstractSessionManager.java:1054)
        at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.checkSession(SessionDispatcher.java:137)
        at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:87)
        at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:58)
        at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:55)
        at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:186)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:55)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:398)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
        at org.mortbay.jetty.nio.SelectChannelConnector$RetryContinuation.run(SelectChannelConnector.java:525)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

        Show
        Ted Goddard added a comment - The root cause of the above exception is due to an Exception being thrown during checkSession(). The Excpetion prevents further processing during an expired session. java.lang.IllegalStateException at org.mortbay.jetty.servlet.AbstractSessionManager$Session.setAttribute(AbstractSessionManager.java:1054) at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.checkSession(SessionDispatcher.java:137) at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:87) at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:58) at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:55) at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:186) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:55) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:398) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) at org.mortbay.jetty.nio.SelectChannelConnector$RetryContinuation.run(SelectChannelConnector.java:525) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24470 Mon May 02 13:40:36 MDT 2011 ted.goddard reduced logging level on session cleanup, propagating SessionExpiredException for explicit 500 error from BlockingServlet (ICE-6783)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/xmlhttp/BlockingServlet.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/View.java
        Hide
        Ted Goddard added a comment -

        Logging changes were low risk, however the SessionExpiredException propagation could have functional impact.

        Show
        Ted Goddard added a comment - Logging changes were low risk, however the SessionExpiredException propagation could have functional impact.
        Ted Goddard made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s EE-1.8.2.GA_P03 [ 10251 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #25125 Thu Jul 28 13:35:48 MDT 2011 ted.goddard (ICE-6783)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/util/MonitorRunner.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #25935 Mon Oct 17 09:43:21 MDT 2011 deryk.sinotte ICE-6783: convert error level logging to debug
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/View.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/facelets/D2DFaceletViewHandler.java
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Tyler Johnson added a comment - - edited

        Test
        (Restricted to icesoft-internal-developers group)

        Show
        Tyler Johnson added a comment - - edited Test (Restricted to icesoft-internal-developers group)
        Migration made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Migration made changes -
        Attachment tabs.rtf [ 14899 ]
        Migration made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: