PicoContainer
  1. PicoContainer
  2. PICO-329

PicoContainerServletListener causes NPE with old sessions on a restarting tomcat

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: web-2.0.1
    • Fix Version/s: 3.0
    • Component/s: Web-Core
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Running on tomcat 5.5 or tomcat 6 with file based session persistence. If tomcat detects that sessions have expired, it will invoke sessionDestroyed, causing an NPE at line 217.

      public void sessionDestroyed(HttpSessionEvent event)

      { HttpSession session = event.getSession(); ServletContext context = session.getServletContext(); SessionStoreHolder ssh = (SessionStoreHolder) session.getAttribute(SessionStoreHolder.class.getName()); SessionContainerHolder sch = (SessionContainerHolder) context.getAttribute(SessionContainerHolder.class .getName()); ThreadLocalLifecycleState tlLifecycleState = sch.getLifecycleStateModel(); sessionStoring.putCacheForThread(ssh.getStoreWrapper()); //HERE tlLifecycleState.putLifecycleStateModelForThread(ssh.getDefaultLifecycleState()); sessionContainer.stop(); sessionContainer.dispose(); sessionStoring.invalidateCacheForThread(); }

        People

        • Assignee:
          Michael Rimov
          Reporter:
          Nick Drew
        • Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: