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

Logging can be more descriptive for the IllegalStateException thrown by AccessControl

    Details

      Description

      Class: AccessControlImpl.java
      Code Snippet:

      if (accessControlContext != null) {
      	throw new IllegalStateException(
      		"Authentication context is already initialized");
      }
      

      Error message does not provide any information regarding the source of the already initialized Authentication context. This makes it difficult to determine the cause of this exception.

      Steps to Reproduce

      1. Navigate to Control Panel > Configuration > System Settings > Foundation > CXF Endpoints
      2. Add endpoint with contextPath: /test
      3. Navigate to: http://localhost:8080/o/test
        • Notice the page shows the message: No services have been found.
      4. Add another endpoint with the same contextPath: /test
      5. Navigate to: http://localhost:8080/o/test
        • Notice the page is blank.
      6. Check the logs

      Expected Behavior:
      IllegalStateException is thrown and provides enough information to help debug the issue

      Actual Behavior:
      IllegalStateException is thrown and only shows the message: Authentication context is already initialized

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 4 weeks, 1 day ago

                  Packages

                  Version Package
                  7.0.0 DXP FP61
                  7.0.X
                  7.1.10 DXP FP2
                  7.1.1 CE GA2
                  7.1.10.1 SP1
                  7.1.X
                  Master