Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-12315

Cannot create a session after the response has been committed error when a javascript file in a theme is not found

    Details

    • Branch Version/s:
      6.0.x

      Description

      when you request a javascript file that does not exist in a theme you get the following error :

      java.lang.IllegalStateException: Cannot create a session after the response has been committed
      at org.apache.catalina.connector.Request.doGetSession(Request.java:2381)
      at org.apache.catalina.connector.Request.getSession(Request.java:2098)
      at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
      at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
      at com.liferay.portal.util.PortalImpl.getLocale(PortalImpl.java:1959)
      at com.liferay.portal.util.PortalUtil.getLocale(PortalUtil.java:573)
      at com.liferay.portal.language.LanguageImpl.getLanguageId(LanguageImpl.java:398)
      at com.liferay.portal.kernel.language.LanguageUtil.getLanguageId(LanguageUtil.java:189)
      at com.liferay.portal.servlet.filters.language.LanguageFilter.translateResponse(LanguageFilter.java:99)

      To reproduce :

      1. clear your session cookies
      2. open http://localhost:8080/your-theme/js/doesnotexist.js

      notice the error in the log

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 14 weeks, 2 days ago