Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-78601

Jira logs excessive warnings regarding form parameters and servlets, need fix for Platform 7

      Summary

      Many parts of Jira put excessive log messages into the log files regarding form parameters, and servlets. Most prominently, this can be seen when logging in through the login gadget on the dashboard. This was fixed earlier using JRASERVER-30406 by adding the below lines in logging.properties

      # Suppress log spam about the request body - https://jira.atlassian.com/browse/JRASERVER-30406
      com.sun.jersey.spi.container.servlet.WebComponent.level = SEVERE
      com.sun.jersey.spi.container.servlet.WebComponent.filterFormParameters.level = SEVERE 

      Now with the Platform 7 update that included the Jersey update (JAX-RS 2) as mentioned in the release notes the package seem to have migrated from com.sun.jersey (Jersey 1.x)to org.glassfish.jersey(Jersey 2.x)

      These changes will only impact Marketplace partners who develop apps. The underlying libraries, Jackson and Jersey, have been upgraded to the latest versions. REST v2 also makes use of JAX-RS 2. Check out the REST v2 migration guide

      Hence, the old fix does not seem to be working for Jira 10 and above. 

      Steps to Reproduce

      1. Log out of Jira
      2. Visit the System Dashboard
      3. Log in to Jira

      Expected Results

      The log in completes with no warnings.

      Actual Results

      Below exception is thrown in the catalina.out file:

      07-Feb-2025 09:02:24.164 WARNING [http-nio-8080-exec-8 url: /jira/rest/api/2/settings/baseUrl; user: admin] org.glassfish.jersey.servlet.WebComponent.filterFormParameters A servlet request to the URI https://<base-url>/jira/rest/activity-stream/1.0/preferences?_=1738918943981 contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.
      07-Feb-2025 09:02:46.903 WARNING [http-nio-8080-exec-11 url: /jira/rest/activity-stream/1.0/preferences; user: admin] org.glassfish.jersey.servlet.WebComponent.filterFormParameters A servlet request to the URI https://<base-url>/jira/rest/activity-stream/1.0/preferences?_=1738918966735 contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.  

       Note that the URL will vary wildly depending on the specific usage - this is but one example.

      Workaround 

      1. Shut down Jira
      2. Edit $jira-install/conf/logging.properties, and add the following at the bottom:
        org.glassfish.jersey.servlet.WebComponent.level = SEVERE
        org.glassfish.jersey.servlet.WebComponent.filterFormParameters.level = SEVERE 
      3. Restart Jira for the changes to take effect

            [JRASERVER-78601] Jira logs excessive warnings regarding form parameters and servlets, need fix for Platform 7

              aea6bfd9e5b3 Bartosz Radaczyński
              afd2063a99c7 Vamshi R
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: