3 Replies Latest reply on Jan 3, 2012 10:45 AM by John Aja

    java.lang.IllegalStateException: Cannot create a session after the response has been committed

    John Aja Newbie

      Hi

       

      Hope someone can help on this. I am running richfaces 4.0 using tomcat 6.0.32 on a linux server. I have the following index.xhtml fiie which consists of a simple tab panel and some collapsible panels in the tabs. There are no backing(managed) beans just this file for now in my project.

       

       

      <h:form id="form">
              <rich:tabPanel switchType="client" >
                  <rich:tab header="Overview">
                      <rich:collapsiblePanel header="Overview" switchType="client" styleClass="overview-collapsible-panel">
                          <div class="overview-label-wrapper">
                              <span class="overview-label">Total Number of Applications:</span> 5
                          </div>
                      </rich:collapsiblePanel>
                      <rich:collapsiblePanel header="Licensing" switchType="client" styleClass="overview-collapsible-panel">
                          <div  class="overview-label-wrapper">
                              <span class="overview-label">Total Number of Licenses Available:</span> 10
                          </div>
                      </rich:collapsiblePanel>
                  </rich:tab>
                  <rich:tab header="Options"> 
                      <rich:collapsiblePanel header="General Options" switchType="client" 
                                 styleClass="overview-collapsible-panel">
                              <div class="options-input">
                                  <rich:select value="0">
                                      <f:selectItem itemValue="0" itemLabel="Trace"/>
                                      <f:selectItem itemValue="1" itemLabel="Info" />
                                  </rich:select>
                              </div>
                      </rich:collapsiblePanel>
                  </rich:tab>
              </rich:tabPanel>
          </h:form>
      

       

      when I try to access it I get the following weird error:

       

      @400000004ed914e73b6279fc Dec 2, 2011 1:11:41 PM com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException

      @400000004ed914e73b631e0c SEVERE: Error Rendering View[/index.xhtml]

      @400000004ed914e73b633d4c java.lang.IllegalStateException: Cannot create a session after the response has been committed

      @400000004ed914e73b635c8c       at org.apache.catalina.connector.Request.doGetSession(Request.java:2400)

      @400000004ed914e73b6377e4       at org.apache.catalina.connector.Request.getSession(Request.java:2120)

      @400000004ed914e73b639724       at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)

      @400000004ed914e73b63b27c       at com.sun.faces.context.ExternalContextImpl.getSession(ExternalContextImpl.java:155)

      @400000004ed914e73b63d1bc       at javax.faces.context.ExternalContextWrapper.getSession(ExternalContextWrapper.java:396)

      @400000004ed914e73b63ed14       at com.sun.faces.renderkit.ServerSideStateHelper.writeState(ServerSideStateHelper.java:175)

      @400000004ed914e73b640c54       at com.sun.faces.renderkit.ResponseStateManagerImpl.writeState(ResponseStateManagerImpl.java:122)

      @400000004ed914e73b642b94       at com.sun.faces.application.StateManagerImpl.writeState(StateManagerImpl.java:166)

      @400000004ed914e73b6446ec       at com.sun.faces.application.view.WriteBehindStateWriter.flushToWriter(WriteBehindStateWriter.java:225)

      @400000004ed914e73b64b834       at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:418)

      @400000004ed914e73b64df44       at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)

      @400000004ed914e73b64fa9c       at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)

      @400000004ed914e73b6515f4       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)

      @400000004ed914e73b65d55c       at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

      @400000004ed914e73b65f49c       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

      @400000004ed914e73b660ff4       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:410)

      @400000004ed914e73b662b4c       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

      @400000004ed914e73b664a8c       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      @400000004ed914e73b6665e4       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

      @400000004ed914e73b66813c       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

      @400000004ed914e73b66a07c       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

      @400000004ed914e73b670224       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

      @400000004ed914e73b672164       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

      @400000004ed914e73b673cbc       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)

      @400000004ed914e73b675814       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)

      @400000004ed914e73b677754       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

      @400000004ed914e73b6792ac       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

      @400000004ed914e73b67ae04       at java.lang.Thread.run(Thread.java:636)

      @400000004ed914e73b8115ec Dec 2, 2011 1:11:41 PM com.sun.faces.context.ExceptionHandlerImpl throwIt

      @400000004ed914e73b818f04 INFO: Exception when handling error trying to reset the response.

      @400000004ed914e73b81ae44 java.lang.IllegalStateException: Cannot create a session after the response has been committed

      @400000004ed914e73b81cd84       at org.apache.catalina.connector.Request.doGetSession(Request.java:2400)

      @400000004ed914e73b81e8dc       at org.apache.catalina.connector.Request.getSession(Request.java:2120)

      @400000004ed914e73b82081c       at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)

      @400000004ed914e73b822374       at com.sun.faces.context.ExternalContextImpl.getSession(ExternalContextImpl.java:155)

      @400000004ed914e73b8242b4       at javax.faces.context.ExternalContextWrapper.getSession(ExternalContextWrapper.java:396)

      @400000004ed914e73b825e0c       at com.sun.faces.renderkit.ServerSideStateHelper.writeState(ServerSideStateHelper.java:175)

      @400000004ed914e73b827d4c       at com.sun.faces.renderkit.ResponseStateManagerImpl.writeState(ResponseStateManagerImpl.java:122)

      @400000004ed914e73b8298a4       at com.sun.faces.application.StateManagerImpl.writeState(StateManagerImpl.java:166)

      @400000004ed914e73b82b7e4       at com.sun.faces.application.view.WriteBehindStateWriter.flushToWriter(WriteBehindStateWriter.java:225)

      @400000004ed914e73b83215c       at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:418)

      @400000004ed914e73b834484       at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)

      @400000004ed914e73b835fdc       at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)

      @400000004ed914e73b837b34       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)

      @400000004ed914e73b83968c       at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

      @400000004ed914e73b83b1e4       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

      @400000004ed914e73b83cd3c       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:410)

      @400000004ed914e73b83e894       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

      @400000004ed914e73b8403ec       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      @400000004ed914e73b841f44       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

      @400000004ed914e73b843a9c       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

      @400000004ed914e73b84c354       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

      @400000004ed914e73b8528e4       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

      @400000004ed914e73b854824       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

      @400000004ed914e73b85637c       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)

      @400000004ed914e73b857ed4       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)

      @400000004ed914e73b859a2c       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

      @400000004ed914e73b85b584       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

      @400000004ed914e73b85d0dc       at java.lang.Thread.run(Thread.java:636)

      @400000004ed914e73b8fcb8c Dec 2, 2011 1:11:41 PM com.sun.faces.renderkit.RenderKitUtils renderHtmlErrorPage

      @400000004ed914e73b902564 WARNING: JSF1087: Unable to generate Facelets error page as the response has already been committed.

      @400000004ed914e8000cbfac Dec 2, 2011 1:11:41 PM com.sun.faces.renderkit.RenderKitUtils renderHtmlErrorPage

      @400000004ed914e8000d67a4 SEVERE: javax.faces.FacesException: Cannot create a session after the response has been committed

      @400000004ed914e8000d86e4 javax.faces.FacesException: Cannot create a session after the response has been committed

      @400000004ed914e8000da624       at com.sun.faces.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:141)

      @400000004ed914e8000dc17c       at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)

      @400000004ed914e8000ddcd4       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

      @400000004ed914e8000df82c       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:410)

      @400000004ed914e8000e1384       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

      @400000004ed914e8000e32c4       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      @400000004ed914e8000e4e1c       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

      @400000004ed914e8000e6d5c       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

      @400000004ed914e8000e88b4       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

      @400000004ed914e8000ea40c       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

      @400000004ed914e8000f1554       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

      @400000004ed914e8000f30ac       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)

      @400000004ed914e8000f4fec       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)

      @400000004ed914e8000f675c       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

      @400000004ed914e8000f869c       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

      @400000004ed914e8000fa1f4       at java.lang.Thread.run(Thread.java:636)

      @400000004ed914e8000fb964 Caused by: java.lang.IllegalStateException: Cannot create a session after the response has been committed

      @400000004ed914e8000fd8a4       at org.apache.catalina.connector.Request.doGetSession(Request.java:2400)

      @400000004ed914e8000ff3fc       at org.apache.catalina.connector.Request.getSession(Request.java:2120)

      @400000004ed914e800100f54       at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)

      @400000004ed914e800102aac       at com.sun.faces.context.ExternalContextImpl.getSession(ExternalContextImpl.java:155)

      @400000004ed914e8001049ec       at javax.faces.context.ExternalContextWrapper.getSession(ExternalContextWrapper.java:396)

      @400000004ed914e80010af7c       at com.sun.faces.renderkit.ServerSideStateHelper.writeState(ServerSideStateHelper.java:175)

      @400000004ed914e80010cad4       at com.sun.faces.renderkit.ResponseStateManagerImpl.writeState(ResponseStateManagerImpl.java:122)

      @400000004ed914e800115f44       at com.sun.faces.application.StateManagerImpl.writeState(StateManagerImpl.java:166)

      @400000004ed914e80011826c       at com.sun.faces.application.view.WriteBehindStateWriter.flushToWriter(WriteBehindStateWriter.java:225)

      @400000004ed914e80011a1ac       at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:418)

      @400000004ed914e80011c0ec       at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)

      @400000004ed914e80011dc44       at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)

      @400000004ed914e80011fb84       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)

      @400000004ed914e8001216dc       at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)