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

Exception throws when adding Sharepoint repository

    Details

      Description

      Reproduction steps:

      1. Go to Control Panel > Configuration > System Settings > Collaboration > Sharepoint OAuth2
      2. Add Sharepoint OAuth2
      3. Go to DM to add a Sharepoint repository

      Expected Results: Add sharepoint repository successful.
      Actual Results: Fail to add Sharepoint repository, exception throws on the console:

      2019-04-24 06:04:11.427 ERROR [http-nio-8080-exec-3][IncludeTag:128] Current URL /group/guest/~/control_panel/manage?p_p_id=com_liferay_document_library_web_portlet_DLAdminPortlet&p_p_lifecycle=0&p_p_state=maximized&p_v_l_s_g_id=20123 generates exception: com.liferay.portal.kernel.security.auth.PrincipalException
      com.liferay.portal.kernel.security.auth.PrincipalException
              at com.liferay.sharepoint.rest.repository.internal.document.library.repository.external.SharepointExtRepository._getAccessToken(SharepointExtRepository.java:714)
              at com.liferay.sharepoint.rest.repository.internal.document.library.repository.external.SharepointExtRepository._getJSONObject(SharepointExtRepository.java:775)
              at com.liferay.sharepoint.rest.repository.internal.document.library.repository.external.SharepointExtRepository.getExtRepositoryObject(SharepointExtRepository.java:346)
              at com.liferay.sharepoint.rest.repository.internal.document.library.repository.external.SharepointCachingExtRepository.getExtRepositoryObject(SharepointCachingExtRepository.java:282)
              at com.liferay.document.library.repository.external.ExtRepositoryAdapter.getFolder(ExtRepositoryAdapter.java:519)
              at com.liferay.document.library.repository.external.ExtRepositoryAdapter.getFolder(ExtRepositoryAdapter.java:82)
              at com.liferay.portal.repository.util.RepositoryWrapper.getFolder(RepositoryWrapper.java:358)
              at com.liferay.portal.repository.capabilities.CapabilityRepository.getFolder(CapabilityRepository.java:488)
              at com.liferay.document.library.internal.security.permission.resource.FolderModelResourcePermissionRegistrar.lambda$null$0(FolderModelResourcePermissionRegistrar.java:60)
              at com.liferay.portal.kernel.internal.security.permission.resource.DefaultModelResourcePermission._contains(DefaultModelResourcePermission.java:141)
              at com.liferay.portal.kernel.internal.security.permission.resource.DefaultModelResourcePermission.contains(DefaultModelResourcePermission.java:113)
              at com.liferay.portal.kernel.internal.security.permission.resource.DefaultModelResourcePermission.contains(DefaultModelResourcePermission.java:32)
              at com.liferay.document.library.web.internal.security.permission.resource.DLFolderPermission.contains(DLFolderPermission.java:73)
              at org.apache.jsp.document_005flibrary.view_005fentries_jsp._jspService(view_005fentries_jsp.java:2009)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  20 weeks, 6 days ago

                  Packages

                  Version Package
                  Master