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

Fix silent exception when adding a user in multi-tenant mode

    XMLWordPrintable

    Details

      Description

      As a tenant administrator, creating a new user succeeds, but an error is logged:

      ERROR [http-bio-0.0.0.0-8080-exec-22] [org.nuxeo.ecm.core.event.impl.EventServiceImpl] Error during timezoneSelector sync listener execution, transaction won't be rolled back since event.markRollBack() was not called by the Listener
      java.lang.NullPointerException
      	at org.nuxeo.ecm.multi.tenant.MultiTenantHelper.getTenantId(MultiTenantHelper.java:103)
      	at org.nuxeo.ecm.multi.tenant.userworkspace.MultiTenantUserWorkspaceService.getCurrentUserPersonalWorkspace(MultiTenantUserWorkspaceService.java:127)
      	at org.nuxeo.ecm.platform.userworkspace.core.service.DefaultUserWorkspaceServiceImpl.getCurrentUserPersonalWorkspace(DefaultUserWorkspaceServiceImpl.java:135)
      	at org.nuxeo.ecm.user.center.profile.localeProvider.UserLocaleSelectorListener.handleEvent(UserLocaleSelectorListener.java:54)
      	at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:215)
      	at org.nuxeo.ecm.core.api.AbstractSession.fireEvent(AbstractSession.java:385)
      	at org.nuxeo.ecm.core.api.AbstractSession.notifyEvent(AbstractSession.java:437)
      	at org.nuxeo.ecm.core.api.AbstractSession.createDocument(AbstractSession.java:932)
      	at sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.invoke(TransactionalCoreSessionWrapper.java:136)
      	at com.sun.proxy.$Proxy101.createDocument(Unknown Source)
      	at org.nuxeo.ecm.user.center.profile.UserProfileServiceImpl$UserProfileDocumentGetter.run(UserProfileServiceImpl.java:147)
      	at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:156)
      	at org.nuxeo.ecm.user.center.profile.UserProfileServiceImpl$UserProfileDocumentGetter.getOrCreate(UserProfileServiceImpl.java:162)
      	at org.nuxeo.ecm.user.center.profile.UserProfileServiceImpl.getUserProfileDocument(UserProfileServiceImpl.java:93)
      	at org.nuxeo.ecm.user.center.profile.UserProfileServiceImpl.getUserProfile(UserProfileServiceImpl.java:103)
      	at org.nuxeo.ecm.user.center.profile.UserProfileActions.getSelectedUserProfile(UserProfileActions.java:176)
      

      The method MultiTenantHelper.getTenantId fails to retrieve a tenant id for the system user.

      When the tenant isolation is disabled, there is also a problem : a personal workspace for the system user is created.

      In both case, we should get the originating user from the SystemPrincipal.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: