java.lang.Illegalstateexception: Cannot create a Session after the Response has been Committed

Asked

Viewed 266 times

1

Good morning guys, I am with a strange problem in my application only after Gero War and send to Integrator, the application does not even open the Login screen, is returned this error:

INFO: Exception when handling error trying to reset the response.
java.lang.IllegalStateException: Cannot create a session after the response has been committed
    at org.apache.catalina.connector.Request.doGetSession(Request.java:3008)
    at org.apache.catalina.connector.Request.getSession(Request.java:2384)
    at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:897)
    at com.sun.faces.context.ExternalContextImpl.getSession(Unknown Source)
    at javax.faces.context.ExternalContextWrapper.getSession(Unknown Source)
    at br.com.mafra.filter.AuthorizationListener.afterPhase(AuthorizationListener.java:24)
    at com.sun.faces.lifecycle.Phase.handleAfterPhase(Unknown Source)
    at com.sun.faces.lifecycle.Phase.doPhase(Unknown Source)
    at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(Unknown Source)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(Unknown Source)
    at javax.faces.webapp.FacesServlet.service(Unknown Source)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at br.com.mafra.filter.ControleFilter.doFilter(ControleFilter.java:41)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
    at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:190)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
  • The message says that it is because the server tries to write something inside Sponse after it has already been finalized and sent back to the browser. However, without your code it is not possible to know what is the cause of this error.

  • Right ... which part of the code would need ???

  • @rubStackOverflow See this: http://meta.pt.stackoverflow.com/q/5359/132

  • Diego, looking at the stacktrace, I think the problem is in the br.com.mafra.filter.AuthorizationListener.afterPhase. Meanwhile, the br.com.mafra.filter.ControleFilter.doFilter would also be another possibility.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.