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

Fix NPE when unregistering custom contribution to userManager extension point

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.10, 8.10, 9.1-SNAPSHOT
    • Fix Version/s: 7.10-HF24, 8.10-HF04, 9.1
    • Component/s: Directory

      Description

      1. when stopping the server one gets the following stack trace:
        2017-03-14 00:10:11,615 ERROR [localhost-startStop-2] [org.nuxeo.runtime.model.impl.RegistrationInfoImpl] Failed to unregister extension. Contributor: RegistrationInfo: service:pe.nuxeo.config.saml2 to service:org.nuxeo.ecm.platform.usermanager.UserService; xpoint: userManager
        java.lang.NullPointerException
        	at org.nuxeo.ecm.platform.usermanager.UserManagerImpl.setConfiguration(UserManagerImpl.java:231)
        	at org.nuxeo.ecm.platform.usermanager.UserService.recomputeUserManager(UserService.java:104)
        	at org.nuxeo.ecm.platform.usermanager.UserService.unregisterContribution(UserService.java:143)
        	at org.nuxeo.runtime.model.DefaultComponent.unregisterExtension(DefaultComponent.java:58)
        	at org.nuxeo.runtime.model.impl.ComponentInstanceImpl.unregisterExtension(ComponentInstanceImpl.java:217)
        	at org.nuxeo.runtime.model.impl.ComponentManagerImpl.unregisterExtension(ComponentManagerImpl.java:285)
        	at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.deactivate(RegistrationInfoImpl.java:407)
        
      2. This is due to no null check in UserManagerImpl.setConfiguration :
                if (cacheService != null && descriptor.userCacheName != null) {
                    principalCache = cacheService.getCache(descriptor.userCacheName);
                    principalCache.invalidateAll();
                }
        

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours
                5h