java.lang.IllegalStateException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Found this while testing autoBeansFacelets. Right now, if you use an IntervalRenderer, and the session expires, then it will throw however many TransientRenderingExceptions before failing, exactly the same as if you closed the browser window. But, that's unnecessary, because the class that calls render on the PersistentFacesState could just look into the PersistentFacesState, and see if the session has expired, and immediately throw a fatal rendering exception. In a server with tight resources it would probably be preferable to use a fail-fast strategy here, especially if the IntervalRenderer uses a large time interval, which could unnecessarily hold resources for a very long time. ERROR [D2DFaceletViewHandler] Problem in renderResponse: 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 com.icesoft.faces.webapp.http.servlet.ServletSessionMap.getAttribute(ServletSessionMap.java:19) at com.icesoft.faces.context.AbstractAttributeMap.containsKey(AbstractAttributeMap.java:94) at com.icesoft.faces.application.D2DViewHandler.getContextServletTables(D2DViewHandler.java:314) at com.icesoft.faces.application.D2DViewHandler.getContextServletTable(D2DViewHandler.java:325) at com.icesoft.faces.application.D2DViewHandler.clearSession(D2DViewHandler.java:602) at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:246) at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:149) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:268) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137) at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:124) at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:89) 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)
    via by Mark Collette,
  • Found this while testing autoBeansFacelets. Right now, if you use an IntervalRenderer, and the session expires, then it will throw however many TransientRenderingExceptions before failing, exactly the same as if you closed the browser window. But, that's unnecessary, because the class that calls render on the PersistentFacesState could just look into the PersistentFacesState, and see if the session has expired, and immediately throw a fatal rendering exception. In a server with tight resources it would probably be preferable to use a fail-fast strategy here, especially if the IntervalRenderer uses a large time interval, which could unnecessarily hold resources for a very long time. ERROR [D2DFaceletViewHandler] Problem in renderResponse: 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 com.icesoft.faces.webapp.http.servlet.ServletSessionMap.getAttribute(ServletSessionMap.java:19) at com.icesoft.faces.context.AbstractAttributeMap.containsKey(AbstractAttributeMap.java:94) at com.icesoft.faces.application.D2DViewHandler.getContextServletTables(D2DViewHandler.java:314) at com.icesoft.faces.application.D2DViewHandler.getContextServletTable(D2DViewHandler.java:325) at com.icesoft.faces.application.D2DViewHandler.clearSession(D2DViewHandler.java:602) at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:246) at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:149) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:268) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137) at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:124) at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:89) 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)
    via by Mark Collette,
    • java.lang.IllegalStateException: PWC3991: getOutputStream() has already been called for this response at org.apache.catalina.connector.Response.getWriter(Response.java:704) at org .apache .catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:225) at com .sun .faces .context .ExternalContextImpl.getResponseOutputWriter(ExternalContextImpl.java: 719) at com .sun .faces .context .PartialViewContextImpl .createPartialResponseWriter(PartialViewContextImpl.java:417) at com.sun.faces.context.PartialViewContextImpl.access $300(PartialViewContextImpl.java:68) at com.sun.faces.context.PartialViewContextImpl $ DelayedInitPartialResponseWriter .getWrapped(PartialViewContextImpl.java:555) at javax .faces .context .PartialResponseWriter.startDocument(PartialResponseWriter.java:111) at com .sun .faces .context .AjaxExceptionHandlerImpl .handlePartialResponseError(AjaxExceptionHandlerImpl.java:195) at com .sun .faces .context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java: 119) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:115) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135)
    No Bugmate found.