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

        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.
        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)
        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.
        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)

          People

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

            Dates

            • Created:
              Updated:
              Resolved: