Uploaded image for project: 'Crowd'
  1. Crowd
  2. CWD-3984

Rename user in external directory create new user with same external_id

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Last commented by user?:
      true

      Description

      Sometimes, when renaming users in a external directory, a new user is created, instead of updating the current one. This causes a duplicity in the pair external_id and directory_id which cause an exception when calling the method com.atlassian.confluence.user.crowd.CachedCrowdUserDao.findByExternalId which is used during authentication and synchronization of the external directory.

      The error resulting from that operation is:

      org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2
              at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:590)
              at org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:353)
              at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:375)
              at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337)
              at com.atlassian.crowd.embedded.hibernate2.HibernateUserDao.internalFindUserByExternalId(HibernateUserDao.java:501)
              at com.atlassian.crowd.embedded.hibernate2.HibernateUserDao.internalFindByExternalId(HibernateUserDao.java:473)
              at com.atlassian.crowd.embedded.hibernate2.HibernateUserDao.findByExternalId(HibernateUserDao.java:449)
              at com.atlassian.confluence.user.crowd.CachedCrowdUserDao.findByExternalId(CachedCrowdUserDao.java:164)
      ...

      This affects embedded Crowd so other Atlassian applications (Confluence, JIRA,...) may also have this problem.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                15 Vote for this issue
                Watchers:
                26 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Last commented:
                  2 years, 48 weeks, 4 days ago