PicoContainer
  1. PicoContainer
  2. PICO-377

PicoServletContainerFilter: HttpSession might already by invalidated after doFilter

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.1
    • Fix Version/s: None
    • Component/s: Pico Web Remoting
    • Labels:
      None
    • Patch Submitted:
      Yes
    • Number of attachments :
      0

      Description

      I'm getting a lot of these:

      Dec 13, 2010 9:47:06 AM org.apache.catalina.core.StandardWrapperValve invoke
      SEVERE: Servlet.service() for servlet UploadServlet threw exception
      java.lang.IllegalStateException: setAttribute: Session already invalidated
      	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1326)
      	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1291)
      	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:130)
      	at org.picocontainer.web.PicoServletContainerFilter.doFilter(PicoServletContainerFilter.java:135)
      

      In PicoServletContainerFilter, this

              if (!isStateless) {
                  if (printSessionSize) {
                      PrintSessionSizeDetailsForDebugging.printItIfDebug(debug, ssh);
                  }
                  sess.setAttribute(SessionStoreHolder.class.getName(), ssh);
              }
      

      should probably be

              if (!isStateless) {
                  if (printSessionSize) {
                      PrintSessionSizeDetailsForDebugging.printItIfDebug(debug, ssh);
                  }
                  try {
                      sess.setAttribute(SessionStoreHolder.class.getName(), ssh);
                  }
                  catch (IllegalStateException ex) { /* Shit */ }
              }
      

        People

        • Assignee:
          Paul Hammant
          Reporter:
          Johann Burkard
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: