Details
Description
Seam applications that have logout buttons whose business logic methods
invalidate the session can cause an exception later in the JSF lifecycle, which
breaks any redirection back to a 'login' page.
The BridgeExternalContext attempts to execute the method resetRequestMap, which
throws an IllegalStateException, since the Session has already been invalidated
by the business logic in this case.
Reloading the application will successfully restart it.
While this might seem like a Seam bug, any application writer including a logout
function that invalidates the session will break the application. In other
words, this could be rather common.
Exception is
2006-11-16 09:28:15,239 INFO java.lang.IllegalStateException: getAttribute:
Session already invalidated
2006-11-16 09:28:15,239 ERROR java.lang.IllegalStateException: getAttribute:
Session already invalidated
2006-11-16 09:28:15,239 ERROR at
org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1011)
2006-11-16 09:28:15,239 ERROR at
org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:109)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.context.SessionMap.getAttribute(SessionMap.java:53)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.context.AbstractAttributeMap.containsKey(AbstractAttributeMap.java:94)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.application.D2DViewHandler.getContextServletTables(D2DViewHandler.java:303)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.application.D2DViewHandler.getContextServletTable(D2DViewHandler.java:314)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.context.BridgeFacesContext.getContextServletTable(BridgeFacesContext.java:292)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.context.BridgeExternalContext.getRequestMap(BridgeExternalContext.java:367)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.context.BridgeExternalContext.resetRequestMap(BridgeExternalContext.java:402)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.context.BridgeFacesContext.release(BridgeFacesContext.java:325)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.webapp.xmlhttp.BlockingServlet.renderCycle(BlockingServlet.java:443)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.webapp.xmlhttp.BlockingServlet.receiveUpdates(BlockingServlet.java:427)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:277)
2006-11-16 09:28:15,255 ERROR at
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
. . .
2006-11-16 09:28:15,302 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
invalidate the session can cause an exception later in the JSF lifecycle, which
breaks any redirection back to a 'login' page.
The BridgeExternalContext attempts to execute the method resetRequestMap, which
throws an IllegalStateException, since the Session has already been invalidated
by the business logic in this case.
Reloading the application will successfully restart it.
While this might seem like a Seam bug, any application writer including a logout
function that invalidates the session will break the application. In other
words, this could be rather common.
Exception is
2006-11-16 09:28:15,239 INFO java.lang.IllegalStateException: getAttribute:
Session already invalidated
2006-11-16 09:28:15,239 ERROR java.lang.IllegalStateException: getAttribute:
Session already invalidated
2006-11-16 09:28:15,239 ERROR at
org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1011)
2006-11-16 09:28:15,239 ERROR at
org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:109)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.context.SessionMap.getAttribute(SessionMap.java:53)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.context.AbstractAttributeMap.containsKey(AbstractAttributeMap.java:94)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.application.D2DViewHandler.getContextServletTables(D2DViewHandler.java:303)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.application.D2DViewHandler.getContextServletTable(D2DViewHandler.java:314)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.context.BridgeFacesContext.getContextServletTable(BridgeFacesContext.java:292)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.context.BridgeExternalContext.getRequestMap(BridgeExternalContext.java:367)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.context.BridgeExternalContext.resetRequestMap(BridgeExternalContext.java:402)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.context.BridgeFacesContext.release(BridgeFacesContext.java:325)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.webapp.xmlhttp.BlockingServlet.renderCycle(BlockingServlet.java:443)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.webapp.xmlhttp.BlockingServlet.receiveUpdates(BlockingServlet.java:427)
2006-11-16 09:28:15,239 ERROR at
com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:277)
2006-11-16 09:28:15,255 ERROR at
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
. . .
2006-11-16 09:28:15,302 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
This issue needs to be analyzed along with other Seam related issues and distilled to root causes.