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

Rename user in external directory create new user with same external_id

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Medium Medium
    • None
    • None
    • None

      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.

            [CWD-3984] Rename user in external directory create new user with same external_id

            Hi patrik.thunstrom,

            Thanks for noticing that, I've updated the issue links to clarify the duplicate.

            Avi Knoll (Inactive) added a comment - Hi patrik.thunstrom , Thanks for noticing that, I've updated the issue links to clarify the duplicate.

            Duplicate of what?
            It may very well be a good choice closing this as a duplicate but a reference to the ticket it duplicates would be good.
            There are quite a few similar issues with slightly different nuances, so that makes it even more important to ensure that the duplicate is a proper match.

            Patrik Thunström added a comment - Duplicate of what? It may very well be a good choice closing this as a duplicate but a reference to the ticket it duplicates would be good. There are quite a few similar issues with slightly different nuances, so that makes it even more important to ensure that the duplicate is a proper match.

            We also ran into this problem for the first time, also needed to manually edit the DB. please fix

            Jelle Mulckhuijse added a comment - We also ran into this problem for the first time, also needed to manually edit the DB. please fix

            Jeffrey H added a comment -

            It's pretty shameful that this hasn't been fixed. We just ran into this for the first time and had to manually delete the duplicate user in the DB.

            Jeffrey H added a comment - It's pretty shameful that this hasn't been fixed. We just ran into this for the first time and had to manually delete the duplicate user in the DB.

            Tim C added a comment -

            Is there a work around for this issue besides fixing the users in the DB? We use AD with crowd and there really isnt a option to rename users that we know of. Everytime we rename users in AD a new user is being created in crowd and then synched over to Jira and Confluence. We have had problems renaming users for sometime now. Is there proper way of doing it? If this is a bug why is it taken almost a year for any work to be done to it? Is just not using crowd the best option for renaming users?

            Tim C added a comment - Is there a work around for this issue besides fixing the users in the DB? We use AD with crowd and there really isnt a option to rename users that we know of. Everytime we rename users in AD a new user is being created in crowd and then synched over to Jira and Confluence. We have had problems renaming users for sometime now. Is there proper way of doing it? If this is a bug why is it taken almost a year for any work to be done to it? Is just not using crowd the best option for renaming users?

            intersol_old added a comment -

            This bug is preventing people from accessing the system unless someone is patching database, it seems to have a new case like this every month, clearly not something to expect from a product that is aimed for enterprise usage.

            intersol_old added a comment - This bug is preventing people from accessing the system unless someone is patching database, it seems to have a new case like this every month, clearly not something to expect from a product that is aimed for enterprise usage.

              Unassigned Unassigned
              aconde Alejandro Conde Carrillo (Inactive)
              Affected customers:
              15 This affects my team
              Watchers:
              26 Start watching this issue

                Created:
                Updated:
                Resolved: