Uploaded image for project: 'MidPoint'
  1. MidPoint
  2. MID-544

Synchronization fails if correlation returns already existing user; trying to Add instead of modify/link

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.9 (Cronus)
    • 1.10 (Phoebe)
    • Model, Provisioning
    • None
    • OpenDJ resource

    Description

      1. create user "katka2222" in midPoint. Do not assign any resource accounts.
      2. setup synchronization for OpenDJ resource (default)
      3. create user "katka2222" in OpenDJ

      Synchronization should link both accounts. It does not. Instead, exception:

      2011-10-21 11:42:44,748 [RESOURCEOBJECTCHANGELISTENER] [midpoint-task-15] DEBUG (com.evolveum.midpoint.model.controller.handler.UserTypeHandler): op com.evolveum.midpoint.model.api.ModelService.addUser, st: FATAL_ERROR, msg: Couldn't add user 'katka2222', oid 'null' because user already exists.
      [cause]ObjectAlreadyExistsException:Object with the same name or oid already exists
      com.evolveum.midpoint.repo.xml.XmlRepositoryService.executeQuery(XmlRepositoryService.java:798)
      com.evolveum.midpoint.repo.xml.XmlRepositoryService.addObject_aroundBody0(XmlRepositoryService.java:170)
      com.evolveum.midpoint.repo.xml.XmlRepositoryService$AjcClosure1.run(XmlRepositoryService.java:1)
      org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
      com.evolveum.midpoint.util.aspect.MidpointAspect.markSubsystem(MidpointAspect.java:155)
      com.evolveum.midpoint.util.aspect.MidpointAspect.ajc$inlineAccessMethod$com_evolveum_midpoint_util_aspect_MidpointAspect$com_evolveum_midpoint_util_aspect_MidpointAspect$markSubsystem(MidpointAspect.java:1)
      com.evolveum.midpoint.util.aspect.MidpointAspect.processRepositoryNdc(MidpointAspect.java:62)
      com.evolveum.midpoint.repo.xml.XmlRepositoryService.addObject(XmlRepositoryService.java:129)
      com.evolveum.midpoint.repo.cache.RepositoryCache.addObject_aroundBody2(RepositoryCache.java:186)
      com.evolveum.midpoint.repo.cache.RepositoryCache$AjcClosure3.run(RepositoryCache.java:1)
      org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
      com.evolveum.midpoint.util.aspect.MidpointAspect.markSubsystem(MidpointAspect.java:155)
      com.evolveum.midpoint.util.aspect.MidpointAspect.ajc$inlineAccessMethod$com_evolveum_midpoint_util_aspect_MidpointAspect$com_evolveum_midpoint_util_aspect_MidpointAspect$markSubsystem(MidpointAspect.java:1)
      com.evolveum.midpoint.util.aspect.MidpointAspect.processRepositoryNdc(MidpointAspect.java:62)
      com.evolveum.midpoint.repo.cache.RepositoryCache.addObject(RepositoryCache.java:184)
      com.evolveum.midpoint.model.controller.handler.UserTypeHandler.addUser(UserTypeHandler.java:239)
      com.evolveum.midpoint.model.controller.ModelControllerImpl.addUser(ModelControllerImpl.java:208)
      com.evolveum.midpoint.model.sync.action.AddUserAction.executeChanges(AddUserAction.java:82)
      com.evolveum.midpoint.model.sync.SynchronizationService.notifyChange(SynchronizationService.java:380)
      com.evolveum.midpoint.model.sync.SynchronizationService.notifyChange_aroundBody0(SynchronizationService.java:155)
      com.evolveum.midpoint.model.sync.SynchronizationService$AjcClosure1.run(SynchronizationService.java:1)
      org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
      com.evolveum.midpoint.util.aspect.MidpointAspect.markSubsystem(MidpointAspect.java:155)
      com.evolveum.midpoint.util.aspect.MidpointAspect.ajc$inlineAccessMethod$com_evolveum_midpoint_util_aspect_MidpointAspect$com_evolveum_midpoint_util_aspect_MidpointAspect$markSubsystem(MidpointAspect.java:1)
      com.evolveum.midpoint.util.aspect.MidpointAspect.processResourceObjectChangeListenerNdc(MidpointAspect.java:77)
      com.evolveum.midpoint.model.sync.SynchronizationService.notifyChange(SynchronizationService.java:107)
      com.evolveum.midpoint.provisioning.impl.ChangeNotificationDispatcherImpl.notifyChange_aroundBody0(ChangeNotificationDispatcherImpl.java:84)
      com.evolveum.midpoint.provisioning.impl.ChangeNotificationDispatcherImpl$AjcClosure1.run(ChangeNotificationDispatcherImpl.java:1)
      org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
      com.evolveum.midpoint.util.aspect.MidpointAspect.markSubsystem(MidpointAspect.java:155)
      com.evolveum.midpoint.util.aspect.MidpointAspect.ajc$inlineAccessMethod$com_evolveum_midpoint_util_aspect_MidpointAspect$com_evolveum_midpoint_util_aspect_MidpointAspect$markSubsystem(MidpointAspect.java:1)
      com.evolveum.midpoint.util.aspect.MidpointAspect.processResourceObjectChangeListenerNdc(MidpointAspect.java:77)
      com.evolveum.midpoint.provisioning.impl.ChangeNotificationDispatcherImpl.notifyChange(ChangeNotificationDispatcherImpl.java:76)
      com.evolveum.midpoint.provisioning.impl.ProvisioningServiceImpl.notifyResourceObjectChangeListeners(ProvisioningServiceImpl.java:741)
      com.evolveum.midpoint.provisioning.impl.ProvisioningServiceImpl.synchronize_aroundBody4(ProvisioningServiceImpl.java:337)
      com.evolveum.midpoint.provisioning.impl.ProvisioningServiceImpl$AjcClosure5.run(ProvisioningServiceImpl.java:1)
      org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
      com.evolveum.midpoint.util.aspect.MidpointAspect.markSubsystem(MidpointAspect.java:155)
      com.evolveum.midpoint.util.aspect.MidpointAspect.ajc$inlineAccessMethod$com_evolveum_midpoint_util_aspect_MidpointAspect$com_evolveum_midpoint_util_aspect_MidpointAspect$markSubsystem(MidpointAspect.java:1)
      com.evolveum.midpoint.util.aspect.MidpointAspect.processProvisioningNdc(MidpointAspect.java:72)
      com.evolveum.midpoint.provisioning.impl.ProvisioningServiceImpl.synchronize(ProvisioningServiceImpl.java:271)

      Debug messages:
      2011-10-21 11:42:44,653 [RESOURCEOBJECTCHANGELISTENER] [midpoint-task-15] DEBUG (com.evolveum.midpoint.model.sync.SynchronizationService): CORRELATION: Looking for list of users base
      d on correlation rule.
      2011-10-21 11:42:44,663 [RESOURCEOBJECTCHANGELISTENER] [midpoint-task-15] DEBUG (com.evolveum.midpoint.model.sync.SynchronizationService): Result of search filter expression was null
      or empty. Expression: com.evolveum.midpoint.xml.ns._public.common.common_1.ExpressionType@1479c99[description=<null>,ref=name,language=<null>,code=[c:code: null]]
      2011-10-21 11:42:44,663 [RESOURCEOBJECTCHANGELISTENER] [midpoint-task-15] ERROR (com.evolveum.midpoint.model.sync.SynchronizationService): Couldn't create search filter from correlat
      ion rule.
      2011-10-21 11:42:44,663 [RESOURCEOBJECTCHANGELISTENER] [midpoint-task-15] DEBUG (com.evolveum.midpoint.model.sync.SynchronizationService): CONFIRMATION: No expression for account: 95
      deeadc-f186-4330-9884-2cd97380bf88(OID:805fe72f-5bd1-4947-ad53-131c3f04774a), accepting all results of correlation
      2011-10-21 11:42:44,663 [RESOURCEOBJECTCHANGELISTENER] [midpoint-task-15] DEBUG (com.evolveum.midpoint.model.sync.SynchronizationService): SITUATION: unmatched ()
      2011-10-21 11:42:44,663 [RESOURCEOBJECTCHANGELISTENER] [midpoint-task-15] DEBUG (com.evolveum.midpoint.model.sync.SynchronizationService): ACTION: Executing: class com.evolveum.midpo
      int.model.sync.action.AddUserAction.
      2011-10-21 11:42:44,663 [RESOURCEOBJECTCHANGELISTENER] [midpoint-task-15] DEBUG (com.evolveum.midpoint.model.controller.SchemaHandlerImpl): Processing inbound handling for user null
      with oid null and resource object shadow 95deeadc-f186-4330-9884-2cd97380bf88.
      2011-10-21 11:42:44,675 [RESOURCEOBJECTCHANGELISTENER] [midpoint-task-15] DEBUG (com.evolveum.midpoint.model.controller.SchemaHandlerImpl): INBOUND:

      {http://midpoint.evolveum.com/xml/ns/public/resource/instance/ef2bc95b-76e0-48e2-86d6-3d4f02d3e1a2}

      cn =(new)=> UserType(null,null) : $i:user/i:fullName =

      {http://midpoint.evolveum.com/xml/ns/public/common/common-1.xsd}

      fullName[Katka2222 Katka2222,]Katka2222 Katka2222]
      2011-10-21 11:42:44,684 [RESOURCEOBJECTCHANGELISTENER] [midpoint-task-15] DEBUG (com.evolveum.midpoint.model.controller.SchemaHandlerImpl): INBOUND:

      {http://midpoint.evolveum.com/xml/ns/public/resource/instance/ef2bc95b-76e0-48e2-86d6-3d4f02d3e1a2}

      sn =(new)=> UserType(null,null) : $i:user/i:familyName =

      {http://midpoint.evolveum.com/xml/ns/public/common/common-1.xsd}

      familyName[Katka2222,]Katka2222]
      2011-10-21 11:42:44,687 [RESOURCEOBJECTCHANGELISTENER] [midpoint-task-15] DEBUG (com.evolveum.midpoint.model.controller.SchemaHandlerImpl): INBOUND:

      {http://midpoint.evolveum.com/xml/ns/public/resource/instance/ef2bc95b-76e0-48e2-86d6-3d4f02d3e1a2}

      givenName =(new)=> UserType(null,null) : $i:user/i:givenName =

      {http://midpoint.evolveum.com/xml/ns/public/common/common-1.xsd}

      givenName[Katka2222,]Katka2222]
      2011-10-21 11:42:44,691 [RESOURCEOBJECTCHANGELISTENER] [midpoint-task-15] DEBUG (com.evolveum.midpoint.model.controller.SchemaHandlerImpl): INBOUND:

      {http://midpoint.evolveum.com/xml/ns/public/resource/instance/ef2bc95b-76e0-48e2-86d6-3d4f02d3e1a2}

      uid =(new)=> UserType(null,null) : $i:user/i:name =

      {http://midpoint.evolveum.com/xml/ns/public/common/common-1.xsd}

      name[katka2222,]katka2222]
      /ns/public/resource/instance/ef2bc95b-76e0-48e2-86d6-3d4f02d3e1a2}description =(new)=> UserType(null,null) : $i:user/i:extension/my:description =

      {http://whatever.com/my}

      description[Created by IDM,]Created by IDM]
      2011-10-21 11:42:44,716 [RESOURCEOBJECTCHANGELISTENER] [midpoint-task-15] DEBUG (com.evolveum.midpoint.model.controller.handler.UserTypeHandler): Adding user katka2222, oid null using template Default User Template2, oid c0c010c0-d34d-b33f-f00d-777222222222.
      2011-10-21 11:42:44,717 [RESOURCEOBJECTCHANGELISTENER] [midpoint-task-15] DEBUG (com.evolveum.midpoint.model.controller.SchemaHandlerImpl): Processing property c:fullName.
      2011-10-21 11:42:44,748 [RESOURCEOBJECTCHANGELISTENER] [midpoint-task-15] DEBUG (com.evolveum.midpoint.model.controller.handler.UserTypeHandler): op com.evolveum.midpoint.model.api.ModelService.addUser, st: FATAL_ERROR, msg: Couldn't add user 'katka2222', oid 'null' because user already exists.

      Correlation expression (default):

      <correlation>
        <description>
      					Correlation expression is a search query.
                      	Following search queury will look for users that have "name"
                          equal to the "uid" attribute of the account. Simply speaking,
                          it will look for match in usernames in the IDM and the resource.
                          The correlation rule always looks for users, so it will not match
                          any other object type. 
        </description>
        <equal xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-1.xsd" xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-1.xsd" xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance/ef2bc95b-76e0-48e2-86d6-3d4f02d3e1a2" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:my="http://myself.me/schemas/whatever">
        <c:path>.</c:path>
        <c:valueExpression>
          <c:ref>name</c:ref>
          <c:code>
      $account/attributes/ri:uid
          </c:code>
        </c:valueExpression>
        </equal>
      </correlation>
      

      Attachments

        Activity

          People

            vix Ivan Noris
            vix Ivan Noris
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: