Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-20198

NPE when resolving the members of a virtual group

    XMLWordPrintable

    Details

    • Tags:
    • Team:
      AT

      Description

      For the purpose of a project, I have implemented my own GroupComputer and also the methods to resolve the members of a virtual group.
      In a task of a workflow, I have defined a virtual group as 'Assignees' and I wanted to send an notification when the task is created.
      When resolving the members of a group in the UserManagerImpl, the method getUsersInGroupAndSubGroups() is called and in the chain of called methods an NPE occured in the method getGroupsInGroup().
      The NPE occured because in the last method, there is a call to getGroup(String groupName, DocumentModel context) which is not overrided by the UserManagerWithComputedGroup implementation and it tries to resolve a virtual group as if it is a regular group.

      java.lang.NullPointerException
      	at org.nuxeo.ecm.platform.usermanager.UserManagerImpl.getGroupsInGroup(UserManagerImpl.java:1321)
      	at org.nuxeo.ecm.platform.usermanager.UserManagerImpl.appendSubgroups(UserManagerImpl.java:638)
      	at org.nuxeo.ecm.platform.usermanager.UserManagerImpl.getUsersInGroupAndSubGroups(UserManagerImpl.java:1346)
      	at org.nuxeo.ecm.platform.usermanager.UserManagerImpl.getUsersInGroupAndSubGroups(UserManagerImpl.java:634)
      	at org.nuxeo.ecm.platform.ec.notification.NotificationEventListener.getGroupMembers(NotificationEventListener.java:210)
      	at org.nuxeo.ecm.platform.ec.notification.NotificationEventListener.handleNotifications(NotificationEventListener.java:186)
      	at org.nuxeo.ecm.platform.ec.notification.NotificationEventListener.handleEvent(NotificationEventListener.java:113)
      	at org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$ListenerWork.work(AsyncEventExecutor.java:173)
      	at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:396)
      	at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransactionAndCheckExceptions(AbstractWork.java:357)
      	at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:328)
      	at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:52)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      10:20:37,111 ERROR [AsyncEventExecutor] Failed to execute async event default on listener notificationListener
      java.lang.NullPointerException
      	at org.nuxeo.ecm.platform.usermanager.UserManagerImpl.getGroupsInGroup(UserManagerImpl.java:1321)
      	at org.nuxeo.ecm.platform.usermanager.UserManagerImpl.appendSubgroups(UserManagerImpl.java:638)
      	at org.nuxeo.ecm.platform.usermanager.UserManagerImpl.getUsersInGroupAndSubGroups(UserManagerImpl.java:1346)
      	at org.nuxeo.ecm.platform.usermanager.UserManagerImpl.getUsersInGroupAndSubGroups(UserManagerImpl.java:634)
      	at org.nuxeo.ecm.platform.ec.notification.NotificationEventListener.getGroupMembers(NotificationEventListener.java:210)
      	at org.nuxeo.ecm.platform.ec.notification.NotificationEventListener.handleNotifications(NotificationEventListener.java:186)
      	at org.nuxeo.ecm.platform.ec.notification.NotificationEventListener.handleEvent(NotificationEventListener.java:113)
      	at org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$ListenerWork.work(AsyncEventExecutor.java:173)
      	at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:396)
      	at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransactionAndCheckExceptions(AbstractWork.java:357)
      	at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:328)
      	at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:52)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                PagerDuty

                Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.