Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-97030

Logging and Profiling screen show System Error when a white space is added in the Class/Package name field

      Issue Summary

      When we add a while space in the Class/Package name field and save the Logging and Profiling, it gives the System error.

      This is reproducible on Data Center: Yes

      Steps to Reproduce

      Step-1. Go to   > General Configuration > Logging and Profiling.

      Step-2. If you run Confluence in a cluster, select a cluster node.

      Step-3. Enter the name in the Class/Package name field, with an extra space at the beginning / end or in-between.

      For example " com.atlassian.confluence.mail.session" or "com.atlassian.confluence.mail.session " or "com.atlassian.confluence.mail. session"

      Step-4. Select Add entry to add the new class or package to the list.

      Expected Results

      It should not break the Logging and Profiling screen.

      Actual Results

      It breaks the Logging and Profiling screen and show System Error.

      Workaround

      As any modification on the logging page will always be reset after a Confluence restart, workaround is to restart Confluence. This will reset the logging back to default and resolve the issue.

      Note

      In the logs, we could see we get a java.lang.IllegalArgumentException.

      ERROR [http-nio-8080-exec-9] [atlassian.confluence.status.SystemErrorInformationLogger] logException Unhandled exception 6c59f45b-6bf4-4837-913a-1cf9a7810746: Invocation of method 'nodeUri' in  class com.atlassian.confluence.impl.logging.admin.ConfigureLoggingAction threw exception java.lang.IllegalArgumentException: Illegal character in query at index 35: deleteLogEntry.action?toDeleteName= com.atlassian.confluence.mail.session&atl_token=99522b8729cefe56f1cd274ea4c0e2a28dd9827a at /admin/configurelog4j.vm[line 253, column 38]
       -- traceId: 32d2137bbfa09d38
      org.apache.velocity.exception.MethodInvocationException: Invocation of method 'nodeUri' in  class com.atlassian.confluence.impl.logging.admin.ConfigureLoggingAction threw exception java.lang.IllegalArgumentException: Illegal character in query at index 35: deleteLogEntry.action?toDeleteName= com.atlassian.confluence.mail.session&atl_token=99522b8729cefe56f1cd274ea4c0e2a28dd9827a at /admin/configurelog4j.vm[line 253, column 38]
          at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:342)
      
      Caused by: java.lang.IllegalArgumentException: Illegal character in query at index 35: deleteLogEntry.action?toDeleteName= com.atlassian.confluence.mail.session&atl_token=99522b8729cefe56f1cd274ea4c0e2a28dd9827a
          at java.base/java.net.URI.create(Unknown Source)
      

              b32b3e0ecc4f Kamil Kowalewski
              2ff3e5e81230 Shekhar Gupta
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: