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

Liferay Issues | Minhchau Dang | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

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

    Stack Overflow | 3 years ago | RanPaul
    java.lang.IllegalStateException: Cannot create a session after the response has been committed
  2. 0

    [LPS-43358] Liferay Util methods may attempt to create a session after response is committed - Liferay Issues

    liferay.com | 1 year ago
    java.lang.IllegalStateException: Cannot create a session after the response has been committed
  3. 0

    org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error applying layout : main

    Stack Overflow | 4 years ago | confile
    org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error applying layout : main
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error applying layout : main - scriptscoop.com

    scriptscoop.com | 2 years ago
    org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error applying layout : main
  6. 0

    Even after the response has been committed (for example, on a {{sendRedirect}}), some utility methods may be called. Some of these utility methods will call {{request.getSession()}}, resulting in an {{IllegalStateException}} if a session has not yet been created. {code:title=LanguageUtil.getLanguageId(HttpServletRequest)|borderStyle=solid} java.lang.IllegalStateException: Cannot create a session after the response has been committed at org.apache.catalina.connector.Request.doGetSession(Request.java:2886) at org.apache.catalina.connector.Request.getSession(Request.java:2316) at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:898) at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:910) at com.liferay.portal.util.PortalImpl.getLocale(PortalImpl.java:3294) at com.liferay.portal.util.PortalImpl.getLocale(PortalImpl.java:3222) at com.liferay.portal.util.PortalUtil.getLocale(PortalUtil.java:928) at com.liferay.portal.language.LanguageImpl.getLanguageId(LanguageImpl.java:513) at com.liferay.portal.kernel.language.LanguageUtil.getLanguageId(LanguageUtil.java:220) {code} {code:title=SessionParamUtil.getBoolean(HttpServletRequest, HttpServletResponse, String)|borderStyle=solid} java.lang.IllegalStateException: Cannot create a session after the response has been committed at org.apache.catalina.connector.Request.doGetSession(Request.java:2886) at org.apache.catalina.connector.Request.getSession(Request.java:2316) at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:898) at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:910) at com.liferay.portal.kernel.util.SessionParamUtil.getBoolean(SessionParamUtil.java:35) {code}

    Liferay Issues | 3 years ago | Minhchau Dang
    java.lang.IllegalStateException: Cannot create a session after the response has been committed

  1. marcbouvierdav 1 times, last 1 month ago
  2. QrCeric 1 times, last 1 month ago
  3. Shadd518 1 times, last 9 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:2886)
    2. org.apache.catalina.connector.Request.getSession(Request.java:2316)
    3. org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:898)
    4. org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:910)
    4 frames