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

Atlassian JIRA | Steve Lancashire [Atlassian] | 3 years ago
  1. 0

    This build failed : https://confluence-bamboo.internal.atlassian.com/browse/CONFFUNC-MAINM3-BATCH06-330/test/case/609899714 with this error on the client side {code} com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.api.model.content.Content, and Java type class com.atlassian.confluence.api.model.content.Content, and MIME media type application/octet-stream was not found at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:549) at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:506) at com.sun.jersey.api.client.WebResource.handle(WebResource.java:674) at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:563) at com.atlassian.confluence.rest.client.AbstractRemoteService.post(AbstractRemoteService.java:343) at com.atlassian.confluence.rest.client.AbstractRemoteService.access$300(AbstractRemoteService.java:39) at com.atlassian.confluence.rest.client.AbstractRemoteService$5.call(AbstractRemoteService.java:150) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:55) at com.atlassian.confluence.rest.client.PromisingExecutorService.submit(PromisingExecutorService.java:65) at com.atlassian.confluence.rest.client.AbstractRemoteService.postFuture(AbstractRemoteService.java:145) at com.atlassian.confluence.rest.client.AbstractRemoteService.postFuture(AbstractRemoteService.java:140) at com.atlassian.confluence.rest.client.RemoteContentServiceImpl.create(RemoteContentServiceImpl.java:198) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.confluence.rest.client.proxy.RemoteServiceProxyCreator$1.invoke(RemoteServiceProxyCreator.java:59) at com.sun.proxy.$Proxy15.create(Unknown Source) at com.atlassian.confluence.it.rpc.delegates.ContentRpc.createPage(ContentRpc.java:83) at com.atlassian.confluence.it.rpc.ConfluenceRpc.createPage(ConfluenceRpc.java:624) at com.atlassian.confluence.it.rpc.ConfluenceRpc.createPage(ConfluenceRpc.java:605) at com.atlassian.confluence.MacroDiffAcceptanceTest.setUp(MacroDiffAcceptanceTest.java:43) {code} and the following stack on the server: {code} 2014-03-05 03:22:11,794 DEBUG [http-bio-47362-exec-5] [atlassian.seraph.auth.DefaultAuthenticator] getUserFromCookie getUserFromCookie : Got username : 'null' from cookie, attempting to authenticate user is known 2014-03-05 03:22:11,795 DEBUG [http-bio-47362-exec-5] [atlassian.seraph.auth.DefaultAuthenticator] getUserFromBasicAuthentication getUserFromSession : Looking in Basic Auth headers 2014-03-05 03:22:11,797 DEBUG [http-bio-47362-exec-5] [atlassian.seraph.auth.DefaultAuthenticator] getUserFromBasicAuthentication getUserFromSession : 'admin' does not require elevated security check. Attempting authentication... 2014-03-05 03:22:11,806 DEBUG [http-bio-47362-exec-5] [atlassian.seraph.auth.DefaultAuthenticator] login login : 'admin' has been authenticated 2014-03-05 03:22:11,807 ERROR [http-bio-47362-exec-5] [confluence.web.filter.DebugFilter] getSession HttpServletRequest#getSession has been invoked after the response has been committed for URI /confluence/rest/api/content 2014-03-05 03:22:11,811 ERROR [http-bio-47362-exec-5] [[Catalina].[localhost].[/confluence].[noop]] log Servlet.service() for servlet [noop] in context with path [/confluence] threw exception java.lang.IllegalStateException: Cannot create a session after the response has been committed at org.apache.catalina.connector.Request.doGetSession(Request.java:2921) at org.apache.catalina.connector.Request.getSession(Request.java:2318) at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:899) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229) at com.atlassian.confluence.web.filter.DebugFilter$DebugHttpServletRequestWrapper.getSession(DebugFilter.java:105) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:140) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:238) at com.atlassian.confluence.security.seraph.ConfluenceAuthenticatorUtils.isPrincipalAlreadyInSessionContext(ConfluenceAuthenticatorUtils.java:29) at com.atlassian.confluence.user.ConfluenceAuthenticator.isPrincipalAlreadyInSessionContext(ConfluenceAuthenticator.java:92) at com.atlassian.seraph.auth.DefaultAuthenticator.authoriseUserAndEstablishSession(DefaultAuthenticator.java:192) at com.atlassian.confluence.user.ConfluenceAuthenticator.authoriseUserAndEstablishSession(ConfluenceAuthenticator.java:147) at com.atlassian.seraph.auth.DefaultAuthenticator.login(DefaultAuthenticator.java:102) at com.atlassian.confluence.user.ConfluenceAuthenticator.login(ConfluenceAuthenticator.java:53) at com.atlassian.seraph.auth.DefaultAuthenticator.getUserFromBasicAuthentication(DefaultAuthenticator.java:525) at com.atlassian.seraph.auth.DefaultAuthenticator.getUser(DefaultAuthenticator.java:336) at com.atlassian.confluence.user.ConfluenceAuthenticator.getUser(ConfluenceAuthenticator.java:135) {code}

    Atlassian JIRA | 3 years ago | Steve Lancashire [Atlassian]
    java.lang.IllegalStateException: Cannot create a session after the response has been committed
  2. 0

    This build failed : https://confluence-bamboo.internal.atlassian.com/browse/CONFFUNC-MAINM3-BATCH06-330/test/case/609899714 with this error on the client side {code} com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.api.model.content.Content, and Java type class com.atlassian.confluence.api.model.content.Content, and MIME media type application/octet-stream was not found at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:549) at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:506) at com.sun.jersey.api.client.WebResource.handle(WebResource.java:674) at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:563) at com.atlassian.confluence.rest.client.AbstractRemoteService.post(AbstractRemoteService.java:343) at com.atlassian.confluence.rest.client.AbstractRemoteService.access$300(AbstractRemoteService.java:39) at com.atlassian.confluence.rest.client.AbstractRemoteService$5.call(AbstractRemoteService.java:150) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:55) at com.atlassian.confluence.rest.client.PromisingExecutorService.submit(PromisingExecutorService.java:65) at com.atlassian.confluence.rest.client.AbstractRemoteService.postFuture(AbstractRemoteService.java:145) at com.atlassian.confluence.rest.client.AbstractRemoteService.postFuture(AbstractRemoteService.java:140) at com.atlassian.confluence.rest.client.RemoteContentServiceImpl.create(RemoteContentServiceImpl.java:198) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.confluence.rest.client.proxy.RemoteServiceProxyCreator$1.invoke(RemoteServiceProxyCreator.java:59) at com.sun.proxy.$Proxy15.create(Unknown Source) at com.atlassian.confluence.it.rpc.delegates.ContentRpc.createPage(ContentRpc.java:83) at com.atlassian.confluence.it.rpc.ConfluenceRpc.createPage(ConfluenceRpc.java:624) at com.atlassian.confluence.it.rpc.ConfluenceRpc.createPage(ConfluenceRpc.java:605) at com.atlassian.confluence.MacroDiffAcceptanceTest.setUp(MacroDiffAcceptanceTest.java:43) {code} and the following stack on the server: {code} 2014-03-05 03:22:11,794 DEBUG [http-bio-47362-exec-5] [atlassian.seraph.auth.DefaultAuthenticator] getUserFromCookie getUserFromCookie : Got username : 'null' from cookie, attempting to authenticate user is known 2014-03-05 03:22:11,795 DEBUG [http-bio-47362-exec-5] [atlassian.seraph.auth.DefaultAuthenticator] getUserFromBasicAuthentication getUserFromSession : Looking in Basic Auth headers 2014-03-05 03:22:11,797 DEBUG [http-bio-47362-exec-5] [atlassian.seraph.auth.DefaultAuthenticator] getUserFromBasicAuthentication getUserFromSession : 'admin' does not require elevated security check. Attempting authentication... 2014-03-05 03:22:11,806 DEBUG [http-bio-47362-exec-5] [atlassian.seraph.auth.DefaultAuthenticator] login login : 'admin' has been authenticated 2014-03-05 03:22:11,807 ERROR [http-bio-47362-exec-5] [confluence.web.filter.DebugFilter] getSession HttpServletRequest#getSession has been invoked after the response has been committed for URI /confluence/rest/api/content 2014-03-05 03:22:11,811 ERROR [http-bio-47362-exec-5] [[Catalina].[localhost].[/confluence].[noop]] log Servlet.service() for servlet [noop] in context with path [/confluence] threw exception java.lang.IllegalStateException: Cannot create a session after the response has been committed at org.apache.catalina.connector.Request.doGetSession(Request.java:2921) at org.apache.catalina.connector.Request.getSession(Request.java:2318) at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:899) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229) at com.atlassian.confluence.web.filter.DebugFilter$DebugHttpServletRequestWrapper.getSession(DebugFilter.java:105) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:140) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:238) at com.atlassian.confluence.security.seraph.ConfluenceAuthenticatorUtils.isPrincipalAlreadyInSessionContext(ConfluenceAuthenticatorUtils.java:29) at com.atlassian.confluence.user.ConfluenceAuthenticator.isPrincipalAlreadyInSessionContext(ConfluenceAuthenticator.java:92) at com.atlassian.seraph.auth.DefaultAuthenticator.authoriseUserAndEstablishSession(DefaultAuthenticator.java:192) at com.atlassian.confluence.user.ConfluenceAuthenticator.authoriseUserAndEstablishSession(ConfluenceAuthenticator.java:147) at com.atlassian.seraph.auth.DefaultAuthenticator.login(DefaultAuthenticator.java:102) at com.atlassian.confluence.user.ConfluenceAuthenticator.login(ConfluenceAuthenticator.java:53) at com.atlassian.seraph.auth.DefaultAuthenticator.getUserFromBasicAuthentication(DefaultAuthenticator.java:525) at com.atlassian.seraph.auth.DefaultAuthenticator.getUser(DefaultAuthenticator.java:336) at com.atlassian.confluence.user.ConfluenceAuthenticator.getUser(ConfluenceAuthenticator.java:135) {code}

    Atlassian JIRA | 3 years ago | Steve Lancashire [Atlassian]
    java.lang.IllegalStateException: Cannot create a session after the response has been committed
  3. 0

    Hazelcast web session replication filter may die if response committed

    GitHub | 2 years ago | davidmc24
    java.lang.IllegalStateException: Cannot create a session after the response has been committed
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Exception evaluating SpringEL expression: "_csrf.token"

    GitHub | 6 months ago | berniegp
    org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates/home.html]")
  6. 0

    Session clustering v3.2.1. WebFilter force session creation after response has been committed.

    GitHub | 3 years ago | arokhmistrov
    java.lang.IllegalStateException: Cannot create a session after the response has been committed

  1. Shadd518 1 times, last 4 months ago
5 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalStateException

    Cannot create a session after the response has been committed

    at org.apache.catalina.connector.Request.doGetSession()
  2. Glassfish Core
    RequestFacade.getSession
    1. org.apache.catalina.connector.Request.doGetSession(Request.java:2921)
    2. org.apache.catalina.connector.Request.getSession(Request.java:2318)
    3. org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:899)
    3 frames
  3. JavaServlet
    HttpServletRequestWrapper.getSession
    1. javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229)
    1 frame
  4. com.atlassian.confluence
    DebugFilter$DebugHttpServletRequestWrapper.getSession
    1. com.atlassian.confluence.web.filter.DebugFilter$DebugHttpServletRequestWrapper.getSession(DebugFilter.java:105)
    1 frame
  5. com.atlassian.plugin
    PluginHttpRequestWrapper.getSession
    1. com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146)
    2. com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146)
    3. com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146)
    4. com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146)
    5. com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146)
    6. com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146)
    7. com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146)
    8. com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:140)
    8 frames
  6. JavaServlet
    HttpServletRequestWrapper.getSession
    1. javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:238)
    1 frame
  7. com.atlassian.confluence
    ConfluenceAuthenticator.isPrincipalAlreadyInSessionContext
    1. com.atlassian.confluence.security.seraph.ConfluenceAuthenticatorUtils.isPrincipalAlreadyInSessionContext(ConfluenceAuthenticatorUtils.java:29)
    2. com.atlassian.confluence.user.ConfluenceAuthenticator.isPrincipalAlreadyInSessionContext(ConfluenceAuthenticator.java:92)
    2 frames
  8. com.atlassian.seraph
    DefaultAuthenticator.authoriseUserAndEstablishSession
    1. com.atlassian.seraph.auth.DefaultAuthenticator.authoriseUserAndEstablishSession(DefaultAuthenticator.java:192)
    1 frame
  9. com.atlassian.confluence
    ConfluenceAuthenticator.authoriseUserAndEstablishSession
    1. com.atlassian.confluence.user.ConfluenceAuthenticator.authoriseUserAndEstablishSession(ConfluenceAuthenticator.java:147)
    1 frame
  10. com.atlassian.seraph
    DefaultAuthenticator.login
    1. com.atlassian.seraph.auth.DefaultAuthenticator.login(DefaultAuthenticator.java:102)
    1 frame
  11. com.atlassian.confluence
    ConfluenceAuthenticator.login
    1. com.atlassian.confluence.user.ConfluenceAuthenticator.login(ConfluenceAuthenticator.java:53)
    1 frame
  12. com.atlassian.seraph
    DefaultAuthenticator.getUser
    1. com.atlassian.seraph.auth.DefaultAuthenticator.getUserFromBasicAuthentication(DefaultAuthenticator.java:525)
    2. com.atlassian.seraph.auth.DefaultAuthenticator.getUser(DefaultAuthenticator.java:336)
    2 frames
  13. com.atlassian.confluence
    ConfluenceAuthenticator.getUser
    1. com.atlassian.confluence.user.ConfluenceAuthenticator.getUser(ConfluenceAuthenticator.java:135)
    1 frame