Uploaded image for project: 'FishEye'
  1. FishEye
  2. FE-6432

Rename in external directory syncs to Crowd but fails to sync to application, creates new user instead

    XMLWordPrintable

Details

    Description

      Summary

      Renaming a user in an external directory will correctly synchronize and update Crowd but the subsequent synchronization to FishEye/Crucible creates a new user instead of updating the original.

      Steps to Reproduce

      1. Create a user in LDAP
      2. Synchronize to Crowd
      3. Synchronize to FishEye/Crucible
      4. Rename user in LDAP
      5. Synchronize to Crowd
      6. Synchronize to FishEye/Crucible

      Expected Results

      The original user is renamed.

      Actual Results

      A new user is created.

      Notes

      Subsequently, full synchronizations fail:

      2016-03-18 17:45:00,420 ERROR [schedulerServiceQuartzScheduler_Worker-4 ] com.atlassian.crowd.directory.DbCachingDirectoryPoller DbCachingDirectoryPoller-pollChanges - Error occurred while refreshing the cache for directory [ 4 ].
      java.lang.IllegalArgumentException: Multiple entries with same key: 425985:579fb15a-3894-1035-993b-4b7d5fc76c34=com.atlassian.crowd.model.user.InternalUser@35ab22c8[id=155,name=jdrohan,createdDate=2016-03-18 16:59:53.757,updatedDate=2016-03-18 16:59:53.757,active=true,emailAddress=testuser2@testuser.com,firstName=Daniel,lastName=daniel,displayName=Daniel daniel,credential=com.atlassian.crowd.embedded.api.PasswordCredential@4f341998[credential=********,encryptedCredential=true],lowerName=jdrohan,lowerEmailAddress=testuser2@testuser.com,lowerFirstName=daniel,lowerLastName=daniel,lowerDisplayName=daniel daniel,directoryId=4,externalId=425985:579fb15a-3894-1035-993b-4b7d5fc76c34] and 425985:579fb15a-3894-1035-993b-4b7d5fc76c34=com.atlassian.crowd.model.user.InternalUser@d828551[id=127,name=drohan,createdDate=2016-03-18 13:44:16.43,updatedDate=2016-03-18 16:58:52.718,active=true,emailAddress=testuser2@testuser.com,firstName=Daniel,lastName=daniel,displayName=Daniel daniel,credential=com.atlassian.crowd.embedded.api.PasswordCredential@772943e9[credential=********,encryptedCredential=true],lowerName=drohan,lowerEmailAddress=testuser2@testuser.com,lowerFirstName=daniel,lowerLastName=daniel,lowerDisplayName=daniel daniel,directoryId=4,externalId=425985:579fb15a-3894-1035-993b-4b7d5fc76c34]
      	at com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:150) [guava-18.0.jar:?]
      	at com.google.common.collect.RegularImmutableMap.checkNoConflictInBucket(RegularImmutableMap.java:104) [guava-18.0.jar:?]
      	at com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:70) [guava-18.0.jar:?]
      	at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:254) [guava-18.0.jar:?]
      	at com.atlassian.crowd.directory.DbCachingRemoteChangeOperations.mapUsersByExternalId(DbCachingRemoteChangeOperations.java:1212) [crowd-core-2.8.5-m1.jar:?]
      	at com.atlassian.crowd.directory.DbCachingRemoteChangeOperations.getUsersToAddAndUpdate(DbCachingRemoteChangeOperations.java:1124) [crowd-core-2.8.5-m1.jar:?]
      	at com.atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations.addOrUpdateCachedUsers(DirectoryCacheImplUsingChangeOperations.java:52) [crowd-core-2.8.5-m1.jar:?]
      	at com.atlassian.crowd.directory.ldap.cache.RemoteDirectoryCacheRefresher.synchroniseAllUsers(RemoteDirectoryCacheRefresher.java:95) [crowd-ldap-2.8.5-m1.jar:?]
      	at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:90) [crowd-ldap-2.8.5-m1.jar:?]
      	at com.atlassian.crowd.directory.ldap.cache.EventTokenChangedCacheRefresher.synchroniseAll(EventTokenChangedCacheRefresher.java:67) [crowd-ldap-2.8.5-m1.jar:?]
      	at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:1144) [crowd-core-2.8.5-m1.jar:?]
      	at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:76) [crowd-core-2.8.5-m1.jar:?]
      	at sun.reflect.GeneratedMethodAccessor1098.invoke(Unknown Source) [?:?]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [?:1.8.0_74]
      	at java.lang.reflect.Method.invoke(Unknown Source) [?:1.8.0_74]
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.0.9.RELEASE.jar:4.0.9.RELEASE]
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.0.9.RELEASE.jar:4.0.9.RELEASE]
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.0.9.RELEASE.jar:4.0.9.RELEASE]
      	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98) [spring-tx-4.0.9.RELEASE.jar:4.0.9.RELEASE]
      	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262) [spring-tx-4.0.9.RELEASE.jar:4.0.9.RELEASE]
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95) [spring-tx-4.0.9.RELEASE.jar:4.0.9.RELEASE]
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.0.9.RELEASE.jar:4.0.9.RELEASE]
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) [spring-aop-4.0.9.RELEASE.jar:4.0.9.RELEASE]
      	at com.sun.proxy.$Proxy57.synchronise(Unknown Source) [?:?]
      	at com.atlassian.fecru.user.crowd.NotifyingDirectorySynchroniser.synchronise(NotifyingDirectorySynchroniser.java:26) [fisheye.jar:?]
      	at com.atlassian.crowd.directory.DbCachingDirectoryPoller.pollChanges(DbCachingDirectoryPoller.java:50) [crowd-core-2.8.5-m1.jar:?]
      	at com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJobRunner.runJob(DirectoryPollerJobRunner.java:93) [crowd-core-2.8.5-m1.jar:?]
      	at com.atlassian.fecru.scheduler.FeCruSchedulerService$SessionTerminatingJobRunner.runJob(FeCruSchedulerService.java:71) [fisheye.jar:?]
      	at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:153) [atlassian-scheduler-core-1.6.0.jar:?]
      	at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:118) [atlassian-scheduler-core-1.6.0.jar:?]
      	at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:97) [atlassian-scheduler-core-1.6.0.jar:?]
      	at com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:32) [atlassian-scheduler-quartz1-1.6.0.jar:?]
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:195) [quartz-1.5.1.jar:1.5.1]
      	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) [quartz-1.5.1.jar:1.5.1]

      Workaround

      1. Connect the external directory directly to FishEye/Crucible.
      2. Position this new directory above Crowd.
      3. Perform the rename and synchronize.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              drohan Daniel R
              Votes:
              10 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: