ICEfaces
  1. ICEfaces
  2. ICE-1799

Session expiry in Synchronous mode results in NPE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.6DR#6, 1.6
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces 1.6 release candidate with Synchronous communication mode enabled.

      Description

      When using Synchronous mode, if the session expires any attempt to interact with components in the browsers returns either:

        - A big nasty NPE exception in the browser (FF)
        - A blank page (IE)

      The only way to recover is to either open a new viewport to the app. URL or use the browser Back button to return to the app. URL.


      Tomcat log:

      Jun 29, 2007 10:27:46 AM com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$2 run
      WARNING: [1] views have accumulated updates

      Firefox Error:

      HTTP Status 500 -

      type Exception report

      message

      description The server encountered an internal error () that prevented it from fulfilling this request.

      exception

      java.lang.NullPointerException
      com.icesoft.faces.webapp.http.servlet.ViewBoundAdaptingServlet.service(ViewBoundAdaptingServlet.java:39)
      com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
      com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
      com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:97)
      com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
      com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
      com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
      com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:85)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:54)

      note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.

      Error in the tomcat logs:

      2007-06-29 10:27:52 ApplicationDispatcher[/address] Servlet.service() for servlet Persistent Faces Servlet threw exception
      java.lang.NullPointerException
          at com.icesoft.faces.webapp.http.servlet.ViewBoundAdaptingServlet.service(ViewBoundAdaptingServlet.java:39)
          at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
          at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
          at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:97)
          at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
          at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
          at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
          at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:85)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
          at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
          at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:370)
          at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
          at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:54)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
          at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
          at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
          at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
          at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
          at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
          at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
          at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
          at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
          at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
          at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
          at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
          at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
          at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
          at java.lang.Thread.run(Thread.java:595)


      This is affecting the ICEfaces.org site also.

      The application should have a way to respond to the session expiry and pro-actively clean-up or close the connection, thus preventing the NPE and difficult to recover from error condition.

        Activity

        Ken Fyten created issue -
        Ken Fyten made changes -
        Field Original Value New Value
        Fix Version/s 1.6 [ 10031 ]
        Priority Major [ 3 ] Critical [ 2 ]
        Ken Fyten made changes -
        Description When using Synchronous mode, if the session expires any attempt to interact with components in the browsers returns either:

          - A big nasty NPE exception in the browser (FF)
          - A blank page (IE)

        The only way to recover is to either open a new viewport to the app. URL or use the browser Back button to return to the app. URL.

        This is affecting the ICEfaces.org site also.

        The application should have a way to respond to the session expiry and pro-actively clean-up or close the connection, thus preventing the NPE and difficult to recover from error condition.
        When using Synchronous mode, if the session expires any attempt to interact with components in the browsers returns either:

          - A big nasty NPE exception in the browser (FF)
          - A blank page (IE)

        The only way to recover is to either open a new viewport to the app. URL or use the browser Back button to return to the app. URL.


        Tomcat log:

        Jun 29, 2007 10:27:46 AM com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$2 run
        WARNING: [1] views have accumulated updates

        Firefox Error:

        HTTP Status 500 -

        type Exception report

        message

        description The server encountered an internal error () that prevented it from fulfilling this request.

        exception

        java.lang.NullPointerException
        com.icesoft.faces.webapp.http.servlet.ViewBoundAdaptingServlet.service(ViewBoundAdaptingServlet.java:39)
        com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
        com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
        com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:97)
        com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
        com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
        com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
        com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:85)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:54)

        note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.

        Error in the tomcat logs:

        2007-06-29 10:27:52 ApplicationDispatcher[/address] Servlet.service() for servlet Persistent Faces Servlet threw exception
        java.lang.NullPointerException
            at com.icesoft.faces.webapp.http.servlet.ViewBoundAdaptingServlet.service(ViewBoundAdaptingServlet.java:39)
            at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
            at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
            at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:97)
            at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
            at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
            at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
            at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:85)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:370)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
            at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:54)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
            at java.lang.Thread.run(Thread.java:595)


        This is affecting the ICEfaces.org site also.

        The application should have a way to respond to the session expiry and pro-actively clean-up or close the connection, thus preventing the NPE and difficult to recover from error condition.
        Hide
        Ted Goddard added a comment -

        Try testing if the view is null before calling view.release()

        This may push the bug into another area, however, because there may be something preventing the view from being instantiated.

        Show
        Ted Goddard added a comment - Try testing if the view is null before calling view.release() This may push the bug into another area, however, because there may be something preventing the view from being instantiated.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #14352 Mon Jul 02 10:13:39 MDT 2007 deryk.sinotte ICE-1799 Fixes NPE when session expires in synchronous mode
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/ViewBoundAdaptingServlet.java
        Hide
        Deryk Sinotte added a comment -

        Applied patch provided by Mircea.

        Show
        Deryk Sinotte added a comment - Applied patch provided by Mircea.
        Hide
        Ken Fyten added a comment -

        Verified fixed.

        Show
        Ken Fyten added a comment - Verified fixed.
        Ken Fyten made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 1.6DR#6 [ 10090 ]
        Fix Version/s 1.6 [ 10031 ]
        Ken Fyten made changes -
        Fix Version/s 1.6 [ 10031 ]
        Ken Fyten made changes -
        Security Private [ 10001 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Ken Fyten
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: