In JBoss, session.invalidate() Raises an "IllegalStateException: getAttribute: Session already invalidated" (Doc ID 1255305.1)

Last updated on MARCH 08, 2017

Applies to:

Oracle JDeveloper - Version: 10.1.3.0.4 to 10.1.3.5.0 - Release: to JDeveloper 10g
Information in this document applies to any platform.

Symptoms

You are developing an ADF Faces/Business Component 10g application that you deploy on JBoss 4.0.5.

Your application contains a command button that cleans up the sessions and logs out of the application.

When executing the following line:
session.invalidate();

you get the following error:
getAttribute: Session already invalidated
java.lang.IllegalStateException: getAttribute: Session already invalidated
at org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1011)
at org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:109)
at oracle.adf.share.http.HttpUtil.getAttribute(HttpUtil.java:98)
at oracle.adf.share.http.HttpSessionScopeAdapter.get(HttpSessionScopeAdapter.java:240)
at oracle.adf.share.statemanager.StateManagerScopeAdapter.<init>(StateManagerScopeAdapter.java:88)
at oracle.adf.share.http.HttpStateManagerScopeAdapter.<init>(HttpStateManagerScopeAdapter.java:51)
at oracle.adf.share.http.ServletADFContext.getStateManager(ServletADFContext.java:254)
at oracle.adf.share.statemanager.StateManagerScopeAdapter$ADFScopeListenerImpl.scopeInvalidated(StateManagerScopeAdapter.java:251)
at oracle.adf.share.ADFScopeHelper.fireScopeInvalidated(ADFScopeHelper.java:53)
at oracle.adf.share.http.HttpSessionScopeAdapter.invalidate(HttpSessionScopeAdapter.java:265)
at oracle.adf.share.http.HttpSessionScopeAdapter.valueUnbound(HttpSessionScopeAdapter.java:324)
at org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1615)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:739)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:645)
at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1090)
at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:149)
...

The same application works correctly when deployed in OC4J.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms