ICEfaces
  1. ICEfaces
  2. ICE-10667

Server warning seen in glassfish 3.1.2.2 with sample apps

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: EE-3.3.0.GA_P03
    • Fix Version/s: EE-3.3.0.GA_P03
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      Glassfish 3.1.2.2 on amazon AWS, ICEfaces EE-3.3.0.GA_P03 Jenkins build 04.
    • Assignee Priority:
      P2

      Description

      Server warning seen when using sample apps on glassfish 3.1.2.2. This warning is constantly being displayed while interacting with auction and once or twice when using a scopes application .

      [#|2015-05-01T17:03:27.692-0400|WARNING|glassfish3.1.2|org.apache.catalina.connector.Request|_ThreadID=80;_ThreadName=http-thread-pool-8080(2);|PWC4011: Unable to set request character encoding to UTF-8 from context /auction, because request parameters have already been read, or ServletRequest.getReader() has already been called|#]

        Activity

        Hide
        Mircea Toma added a comment -

        This seems to be a well known issue occurring in Glassfish 3.1.2.
        The following links explain why this happens and the workarounds:

        http://stackoverflow.com/questions/7643484/how-to-get-rid-of-warning-pwc4011-unable-to-set-request-character-encoding-to
        http://qussay.com/2011/07/11/solving-pwc4011-unable-to-set-request-character-encoding-to-utf8/

        Modifying our code to workaround this limitation would be quite extensive.

        Show
        Mircea Toma added a comment - This seems to be a well known issue occurring in Glassfish 3.1.2. The following links explain why this happens and the workarounds: http://stackoverflow.com/questions/7643484/how-to-get-rid-of-warning-pwc4011-unable-to-set-request-character-encoding-to http://qussay.com/2011/07/11/solving-pwc4011-unable-to-set-request-character-encoding-to-utf8/ Modifying our code to workaround this limitation would be quite extensive.
        Hide
        Ken Fyten added a comment -

        Please retest after adopting the work-around documented here:

        http://qussay.com/2011/07/11/solving-pwc4011-unable-to-set-request-character-encoding-to-utf8/

        Show
        Ken Fyten added a comment - Please retest after adopting the work-around documented here: http://qussay.com/2011/07/11/solving-pwc4011-unable-to-set-request-character-encoding-to-utf8/
        Hide
        Liana Munroe added a comment -

        Retested using the suggested work-around. The amazon aws glassfish 3.1.2.2 server instance does not use a glassfish-web.xml, instead it uses a sun-web.xml. There are 2 of these files located at:
        ./Oracle-Sun/GlassFish_Server-3.1.2.2/glassfish/lib/install/applications/__admingui/WEB-INF/sun-web.xml
        ./Oracle-Sun/GlassFish_Server-3.1.2.2-Web/glassfish/lib/install/applications/__admingui/WEB-INF/sun-web.xml.
        I modified both by adding the following:

        <locale-charset-info>
              <locale-charset-map locale="en_CA" charset="UTF-8"/>
              <parameter-encoding default-charset="UTF-8"/>
        </locale-charset-info>

        This did not resolve the server warning issue.

        Show
        Liana Munroe added a comment - Retested using the suggested work-around. The amazon aws glassfish 3.1.2.2 server instance does not use a glassfish-web.xml, instead it uses a sun-web.xml. There are 2 of these files located at: ./Oracle-Sun/GlassFish_Server-3.1.2.2/glassfish/lib/install/applications/__admingui/WEB-INF/sun-web.xml ./Oracle-Sun/GlassFish_Server-3.1.2.2-Web/glassfish/lib/install/applications/__admingui/WEB-INF/sun-web.xml. I modified both by adding the following: <locale-charset-info> <locale-charset-map locale= "en_CA" charset= "UTF-8" /> <parameter-encoding default -charset= "UTF-8" /> </locale-charset-info> This did not resolve the server warning issue.
        Hide
        Mircea Toma added a comment - - edited

        The other link makes it clear that the glassfish-web.xml should be placed in the WEB-INF folder of the application:
        " You can do that by adding the following entry to the <glassfish-web-app> of your /WEB-INF/glassfish-web.xml file:

        <parameter-encoding default-charset="UTF-8"/>
        (note: the file and root entry is previously called sun-web.xml and <sun-web-app> respectively)"

        Show
        Mircea Toma added a comment - - edited The other link makes it clear that the glassfish-web.xml should be placed in the WEB-INF folder of the application: " You can do that by adding the following entry to the <glassfish-web-app> of your /WEB-INF/glassfish-web.xml file: <parameter-encoding default-charset="UTF-8"/> (note: the file and root entry is previously called sun-web.xml and <sun-web-app> respectively)"
        Hide
        Liana Munroe added a comment -

        Verified work-around by creating a glassfish-web.xml file and placing it into the WEB-INF folder of the application.
        The file contains the following:

        <!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD 
        GlassFish Application Server 3.1 Servlet 3.0//EN" 
        "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
             <glassfish-web-app>
                  <parameter-encoding default-charset="UTF-8"/>
            </glassfish-web-app>
        Show
        Liana Munroe added a comment - Verified work-around by creating a glassfish-web.xml file and placing it into the WEB-INF folder of the application. The file contains the following: <!DOCTYPE glassfish-web-app PUBLIC "- //GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0 //EN" "http: //glassfish.org/dtds/glassfish-web-app_3_0-1.dtd" > <glassfish-web-app> <parameter-encoding default -charset= "UTF-8" /> </glassfish-web-app>

          People

          • Assignee:
            Liana Munroe
            Reporter:
            Liana Munroe
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: