Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-42859

Error in commons tool when admin user or user not enrolled access

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 19.4, 20.0, 21.0 [Tentative]
    • Fix Version/s: 19.4, 20.0, 21.0 [Tentative]
    • Component/s: Commons Tool
    • Labels:
      None
    • Environment:
      Tested on nightly trunk
    • 20 status:
      Verified
    • 19 status:
      Verified
    • Test Plan:
      Hide
      1. Login as admin
      2. Access a site admin is not enrolled in
      3. Add the commons tool if not already added
      4. Access the commons tool as admin

      Expected Result : Tool should not display an error and load

      Actual Result : Error is displayed to user and no content is displayed

      Show
      Login as admin Access a site admin is not enrolled in Add the commons tool if not already added Access the commons tool as admin Expected Result : Tool should not display an error and load Actual Result : Error is displayed to user and no content is displayed

      Description

      Admin users not added to a course site will get the following error when accessing the commons tool:

       

      “Failed to get the user permissions. Status: error. Error:"

       

      Log files show the following stack:

       

      04-Dec-2019 10:23:02.289 ERROR [http-apr-9902-exec-3] org.sakaiproject.entitybroker.impl.external.SakaiExternalIntegrationProvider.handleEntityError Direct request failure: RuntimeException:Fatal error trying to execute custom action method: userPerms:list:handleUserPermsGet:Direct request failure: RuntimeException:Fatal error trying to execute custom action method: userPerms:list:handleUserPermsGet: Sakai version: 19.3(19.3)Server: sakai.antioch.edu(antioch-dev) [antioch-dev-1574200655932]Request URI: /direct/commons/userPerms.json Path Info: /commons/userPerms.json Context path: /direct Method: GETServer: antioch-dev-1574200655932 User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36 Browser ID: Mac-Mozilla IP address: 68.228.206.51 User ID: 9bf91169-ef13-4739-82c1-165de83b4320 User EID: lsadmin User Display ID: lsadminFull stacktrace: RuntimeException:Fatal error trying to execute custom action method: userPerms:list:handleUserPermsGet:04-Dec-2019 10:23:02.289 WARN [http-apr-9902-exec-3] org.sakaiproject.entitybroker.util.servlet.DirectServlet.dispatch Direct request failure: RuntimeException:Fatal error trying to execute custom action method: userPerms:list:handleUserPermsGet:Direct request failure: RuntimeException:Fatal error trying to execute custom action method: userPerms:list:handleUserPermsGet: Sakai version: 19.3(19.3)Server: sakai.antioch.edu(antioch-dev) [antioch-dev-1574200655932]Request URI: /direct/commons/userPerms.json Path Info: /commons/userPerms.json Context path: /direct Method: GETServer: antioch-dev-1574200655932 User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36 Browser ID: Mac-Mozilla IP address: 68.228.206.51 User ID: 9bf91169-ef13-4739-82c1-165de83b4320 User EID: lsadmin User Display ID: lsadmin :{} java.lang.RuntimeException: Fatal error trying to execute custom action method: userPerms:list:handleUserPermsGet at org.sakaiproject.entitybroker.rest.EntityActionsManager.handleCustomActionExecution(EntityActionsManager.java:231) at org.sakaiproject.entitybroker.rest.EntityActionsManager.handleCustomActionRequest(EntityActionsManager.java:96) at org.sakaiproject.entitybroker.rest.EntityHandlerImpl.handleEntityAccess(EntityHandlerImpl.java:409) at org.sakaiproject.entitybroker.util.servlet.DirectServlet.dispatch(DirectServlet.java:189) at org.sakaiproject.entitybroker.servlet.SakaiDirectServlet.dispatch(SakaiDirectServlet.java:148) at org.sakaiproject.entitybroker.util.servlet.DirectServlet.handleRequest(DirectServlet.java:159) at org.sakaiproject.entitybroker.util.servlet.DirectServlet.service(DirectServlet.java:134) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.sakaiproject.oauth.filter.OAuthPostFilter.doFilter(OAuthPostFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:475) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.sakaiproject.oauth.filter.OAuthPreFilter.doFilter(OAuthPreFilter.java:74) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:679) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834) at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2079) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.sakaiproject.entitybroker.rest.EntityActionsManager.handleCustomActionExecution(EntityActionsManager.java:206) ... 37 more Caused by: java.lang.NullPointerException at org.sakaiproject.commons.impl.SakaiProxyImpl.getSitePermissionsForCurrentUser(SakaiProxyImpl.java:329) at org.sakaiproject.commons.tool.entityprovider.CommonsEntityProvider.handleUserPermsGet(CommonsEntityProvider.java:348) ... 42 more
      

       

      See Testing tab to steps to reproduce.

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  ern Earle R Nietzel
                  Reporter:
                  karagon Kenneth Aragon
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration