voyent
ICEFaces Session Handling with OnDemandRenderer throws Session already invalidated exception  XML
Forum Index -> General Help
Author Message
jameskhoo

Joined: 30/Jun/2006 00:00:00
Messages: 39
Offline


Hi all

I have a simple web application that perform the following:
a) Upon startup, user is directed to a login page, once user's credential is authenticated, userVO is store into HttpSession. i.e

FacesContext ctx = FacesContext.getCurrentInstance();
HttpSession session = (HttpSession) ctx.getExternalContext().getSession(true);
session.setAttribute(userKey, userVO);

b) Once login, user is directed to a page with OnDemandRenderer, which constantly display new data upon receiving new messages from message queue.

c) When logout, user is directed to index.jsp to invalidate the session. ie.

<%
session.invalidate();
response.sendRedirect("./login.iface");
%>


The above application work fine when the application is restart (i.e Tomcat is restart), and upon first login, when the user perform second login again, the application throws the following errors:
---------------------------------------------
com.icesoft.faces.webapp.xmlhttp.TransientRenderingException: transient render failure for viewNumber 1
at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:161)
at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:142)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.faces.FacesException: Problem in renderResponse: getAttribute: Session already invalidated
at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:324)
at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:146)


Please help.
I am using IceFaces 1.6.1, tomcat 5.5.23.

Thanks
James Khoo




deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


What is the scope of the bean that is implementing the Renderable interface?

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
jameskhoo

Joined: 30/Jun/2006 00:00:00
Messages: 39
Offline


Hi
The bean scope is set to request, should I chagne it to session scope?

Cheers
aberrant80

Joined: 20/Jul/2006 00:00:00
Messages: 34
Offline


It appears to be inconsequential. The same exception occurs regardless of whether the scope is request or session:

Caused by: java.lang.IllegalStateException: getAttribute: Session already invalidated
at org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1021)
at org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:110)
at com.icesoft.faces.webapp.http.servlet.ProxyHttpSession.getAttribute(ProxyHttpSession.java:44)
at com.icesoft.faces.webapp.http.servlet.ServletExternalContext$5.getAttribute(ServletExternalContext.java:122)
at com.icesoft.faces.context.AbstractAttributeMap.containsKey(AbstractAttributeMap.java:94)
at com.icesoft.faces.application.D2DViewHandler.getContextServletTables(D2DViewHandler.java:301)
at com.icesoft.faces.application.D2DViewHandler.getContextServletTable(D2DViewHandler.java:312)
at com.icesoft.faces.application.D2DViewHandler.clearSession(D2DViewHandler.java:695)
at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:290)
jameskhoo

Joined: 30/Jun/2006 00:00:00
Messages: 39
Offline


Hi Deryk

May we knows that if this problem still exists in ICEFaces version 1.6.2, or upcoming version 1.7? This has become a very critical bug for us, and we prefer it get resolve before we decide to buy support from Icefaces
jameskhoo

Joined: 30/Jun/2006 00:00:00
Messages: 39
Offline


Hi Deryk

May I know the status of this bug, if this is fixed in version 1.6.2, I will persuade my manager to purchase a support package from ur guys to access the 1.6.2 version

Cheers
James Khoo
sendewelt

Joined: 04/Sep/2007 00:00:00
Messages: 47
Offline


hi folks,

unfortuanetly this problem is persistent in 1.6.2 and 1.7 beta.

@icefaces pls help...


thx

andi
rodrigo.heffner

Joined: 31/Jan/2008 00:00:00
Messages: 4
Offline


Hi guys...

I just had the same problem in my application.

HttpSession session = (HttpSession) getFacesContext().getExternalContext().getSession(false);
if (session != null) {
session.invalidate();
}

When I try to invalidate my session I get this error:



java.lang.IllegalStateException: getAttribute: Session already invalidated
org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:993)
org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:109)
com.icesoft.faces.webapp.http.servlet.ServletSessionMap.getAttribute(ServletSessionMap.java:19)
com.icesoft.faces.context.AbstractAttributeMap.containsKey(AbstractAttributeMap.java:94)
com.icesoft.faces.application.D2DViewHandler.getContextServletTables(D2DViewHandler.java:297)
com.icesoft.faces.application.D2DViewHandler.getContextServletTable(D2DViewHandler.java:308)
com.icesoft.faces.application.D2DViewHandler.clearSession(D2DViewHandler.java:711)
com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:269)
com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:154)
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:367)
com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:58)
com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:45)
com.icesoft.faces.webapp.http.core.IDVerifier.service(IDVerifier.java:25)
com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
com.icesoft.faces.webapp.http.servlet.ViewBoundAdaptingServlet.service(ViewBoundAdaptingServlet.java:44)
com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:97)
com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:85)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:54)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)


The bug persists on 1.7 beta.

Thanks for your attention!
BornLeo

Joined: 04/Sep/2008 00:00:00
Messages: 40
Offline


Hi,

Any update on this thread. Once the session gets invalid i redirect the control to login page but still session remains invalid.

Regards,
Leo
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team