java.lang.IllegalStateException: getAttributeNames: Session already invalidated

Liferay Issues | Brian Wulbern | 2 years ago
  1. 0

    Steps to reproduce: # Login to portal # Wait until the User session expires Expected result: No stacktrace will be thrown when the sessions expires. Actual result: The following warning and stacktrace is thrown: {code} 16:55:37,777 WARN [http-bio-8080-exec-4][code_jsp:?] {code="500", msg="", uri=/c/portal/expire_session} java.lang.IllegalStateException: getAttributeNames: Session already invalidated at org.apache.catalina.session.StandardSession.getAttributeNames(StandardSession.java:1186) at org.apache.catalina.session.StandardSessionFacade.getAttributeNames(StandardSessionFacade.java:139) at org.eclipse.equinox.http.servlet.internal.servlet.HttpSessionAdaptor.getAttributeNames0(HttpSessionAdaptor.java:152) at org.eclipse.equinox.http.servlet.internal.servlet.HttpSessionAdaptor.invalidate(HttpSessionAdaptor.java:177) at org.eclipse.equinox.http.servlet.internal.servlet.HttpSessionAdaptor$ParentSessionListener.valueUnbound(HttpSessionAdaptor.java:43) at org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1800) at org.apache.catalina.session.StandardSession.expire(StandardSession.java:865) at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:658) at org.apache.catalina.connector.Request.doGetSession(Request.java:2869) at org.apache.catalina.connector.Request.getSessionInternal(Request.java:2516) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:427) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) 16:55:37,782 WARN [http-bio-8080-exec-4][code_jsp:?] {code="500", msg="", uri=/c/portal/expire_session} java.lang.IllegalStateException: getAttributeNames: Session already invalidated at org.apache.catalina.session.StandardSession.getAttributeNames(StandardSession.java:1186) at org.apache.catalina.session.StandardSessionFacade.getAttributeNames(StandardSessionFacade.java:139) at org.eclipse.equinox.http.servlet.internal.servlet.HttpSessionAdaptor.getAttributeNames0(HttpSessionAdaptor.java:152) at org.eclipse.equinox.http.servlet.internal.servlet.HttpSessionAdaptor.invalidate(HttpSessionAdaptor.java:177) at org.eclipse.equinox.http.servlet.internal.servlet.HttpSessionAdaptor$ParentSessionListener.valueUnbound(HttpSessionAdaptor.java:43) at org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1800) at org.apache.catalina.session.StandardSession.expire(StandardSession.java:865) at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:658) at org.apache.catalina.connector.Request.doGetSession(Request.java:2869) at org.apache.catalina.connector.Request.getSessionInternal(Request.java:2516) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:427) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) {code} ---- h3. New version of the error More recently, it has been the following output (and the session doesn't even have to log the User out automatically with this one): {code} Mar 19, 2015 5:05:03 PM org.apache.catalina.core.ContainerBase backgroundProcess WARNING: Exception processing manager org.apache.catalina.session.StandardManager[] background process java.lang.IllegalStateException: getAttributeNames: Session already invalidated at org.apache.catalina.session.StandardSession.getAttributeNames(StandardSession.java:1186) at org.apache.catalina.session.StandardSessionFacade.getAttributeNames(StandardSessionFacade.java:139) at org.eclipse.equinox.http.servlet.internal.servlet.HttpSessionAdaptor.getAttributeNames0(HttpSessionAdaptor.java:152) at org.eclipse.equinox.http.servlet.internal.servlet.HttpSessionAdaptor.invalidate(HttpSessionAdaptor.java:177) at org.eclipse.equinox.http.servlet.internal.servlet.HttpSessionAdaptor$ParentSessionListener.valueUnbound(HttpSessionAdaptor.java:43) at org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1800) at org.apache.catalina.session.StandardSession.expire(StandardSession.java:865) at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:658) at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:534) at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:519) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1352) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519) at java.lang.Thread.run(Thread.java:745) {code}

    Liferay Issues | 2 years ago | Brian Wulbern
    java.lang.IllegalStateException: getAttributeNames: Session already invalidated
  2. 0

    [LPS-54260] Console error thrown when session is idle or expired - Liferay Issues

    liferay.com | 1 year ago
    java.lang.IllegalStateException: getAttributeNames: Session already invalidated
  3. 0

    WebFilter not recognizing invalidated sessions

    GitHub | 4 years ago | ziftytodd
    java.lang.IllegalStateException: getAttributeNames: Session already invalidated
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [http] exception on session timeout

    Eclipse Bugzilla | 2 years ago | raymond.auge
    java.lang.IllegalStateException: getAttributeNames: Session already invalidated
  6. 0

    servlet session listener problems - haalp

    Google Groups | 1 decade ago | Riyaz Mansoor
    java.lang.IllegalStateException: getAttributeNames: Session already invalidated

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      getAttributeNames: Session already invalidated

      at org.apache.catalina.session.StandardSession.getAttributeNames()
    2. Glassfish Core
      StandardSessionFacade.getAttributeNames
      1. org.apache.catalina.session.StandardSession.getAttributeNames(StandardSession.java:1186)
      2. org.apache.catalina.session.StandardSessionFacade.getAttributeNames(StandardSessionFacade.java:139)
      2 frames
    3. org.eclipse.equinox
      HttpSessionAdaptor$ParentSessionListener.valueUnbound
      1. org.eclipse.equinox.http.servlet.internal.servlet.HttpSessionAdaptor.getAttributeNames0(HttpSessionAdaptor.java:152)
      2. org.eclipse.equinox.http.servlet.internal.servlet.HttpSessionAdaptor.invalidate(HttpSessionAdaptor.java:177)
      3. org.eclipse.equinox.http.servlet.internal.servlet.HttpSessionAdaptor$ParentSessionListener.valueUnbound(HttpSessionAdaptor.java:43)
      3 frames
    4. Glassfish Core
      ContainerBase$ContainerBackgroundProcessor.run
      1. org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1800)
      2. org.apache.catalina.session.StandardSession.expire(StandardSession.java:865)
      3. org.apache.catalina.session.StandardSession.isValid(StandardSession.java:658)
      4. org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:534)
      5. org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:519)
      6. org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1352)
      7. org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
      8. org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
      9. org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
      10. org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
      10 frames
    5. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame