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

In WebSphere WARNING messages appear saying "Response already committed"

    Details

      Description

      Not reproducible in master.

      In WebSphere, WARNING messages appear in the log files:
      [1/08/13 11:04:24:873 CEST] 0000001f srt W com.ibm.ws.webcontainer.srt.SRTServletResponse setStatus WARNING: Cannot set status. Response already committed.
      [1/08/13 11:04:24:883 CEST] 0000001f srt W com.ibm.ws.webcontainer.srt.SRTServletResponse setStatus WARNING: Cannot set status. Response already committed.
      [1/08/13 11:04:24:886 CEST] 0000001f srt W com.ibm.ws.webcontainer.srt.SRTServletResponse addHeader WARNING: Cannot set header. Response already committed.
      [1/08/13 11:04:24:906 CEST] 0000001f srt W com.ibm.ws.webcontainer.srt.SRTServletResponse setHeader WARNING: Cannot set header. Response already committed.

      STEPS TO REPRODUCE
      1.- Deploy Liferay 6.1.x into WebSphere
      2.- Open the home page in a browser
      3.- Click on the Liferay logo to refresh the page

      ACTUAL RESULT
      The messages that appear above are shown

      EXPECTED RESULT
      None warnings should appear.

      If the trace.log is activated in WebSphere, it can be checked that this messages appear after a 302 redirect (sendRedirect).
      The Servlet spec states that "After using this method, the response should be considered to be committed and should not be written to." (http://docs.oracle.com/cd/E17802_01/products/products/servlet/2.5/docs/servlet-2_5-mr2/javax/servlet/http/HttpServletResponse.html#sendRedirect%28java.lang.String%29)

      It seems that WebSphere is more stricts about this restriction compared to other app servers.

      The headers and status codes that are written are the following ones:
      [1/08/13 11:14:17:615 CEST] 00000021 srt < com.ibm.ws.webcontainer.srt.SRTServletResponse flushBuffer RETURN
      [1/08/13 11:14:17:616 CEST] 00000021 srt 1 com.ibm.ws.webcontainer.srt.SRTServletResponse setStatus status --> 301
      [1/08/13 11:14:17:616 CEST] 00000021 srt 1 com.ibm.ws.webcontainer.srt.SRTServletRequest getWebAppDispatcherContext
      [1/08/13 11:14:17:616 CEST] 00000021 srt W com.ibm.ws.webcontainer.srt.SRTServletResponse setStatus WARNING: Cannot set status. Response already committed.

      1/08/13 11:14:17:631 CEST] 00000021 srt 1 com.ibm.ws.webcontainer.srt.SRTServletResponse addHeader name --> Liferay-Portal with value --> Liferay Portal Enterprise Edition 6.1 EE GA1 (Paton / Build 611
      0 / February 15, 2012)
      [1/08/13 11:14:17:631 CEST] 00000021 srt 1 com.ibm.ws.webcontainer.srt.SRTServletRequest getWebAppDispatcherContext
      [1/08/13 11:14:17:631 CEST] 00000021 srt W com.ibm.ws.webcontainer.srt.SRTServletResponse addHeader WARNING: Cannot set header. Response already committed.

      [1/08/13 11:14:17:648 CEST] 00000021 srt 1 com.ibm.ws.webcontainer.srt.SRTServletResponse setHeader name --> ETag value --> "0"
      [1/08/13 11:14:17:648 CEST] 00000021 srt 1 com.ibm.ws.webcontainer.srt.SRTServletResponse setHeader name --> ETag value --> "0" checkInclude --> true
      [1/08/13 11:14:17:648 CEST] 00000021 srt 1 com.ibm.ws.webcontainer.srt.SRTServletRequest getWebAppDispatcherContext
      [1/08/13 11:14:17:648 CEST] 00000021 srt W com.ibm.ws.webcontainer.srt.SRTServletResponse setHeader WARNING: Cannot set header. Response already committed.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              justin.choi Justin Choi
              Reporter:
              sergio.sanchez Sergio Sanchez
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 47 weeks, 6 days ago

                  Packages

                  Version Package
                  6.1.X EE
                  6.2.10 EE GA1
                  6.2.X EE