Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-17865

Creating users from email could lead to "java.lang.RuntimeException: Found more than one user with name 'XXXX';" errors

    XMLWordPrintable

Details

    Description

      There are some instances where JIRA somehow ends up with multiple two users with the same username being created.

      ERROR [action.admin.user.UserBrowser] Exception getting users: java.lang.RuntimeException: Found more than one user with name 'XXXX'; 
      ids [GenericEntity:OSUser][passwordHash,null][name,XXXX][id,10340], [GenericEntity:OSUser][passwordHash,null][name,XXXX][id,10320]
      java.lang.RuntimeException: Found more than one user with name 'XXXX'; 
      ids [GenericEntity:OSUser][passwordHash,null][name,XXXX][id,10340], 
      [GenericEntity:OSUser][passwordHash,null][name,XXXX][id,10320]

      Our Knowledge Base article suggests we don't know how this happened:

      We had a support case where it was suggested that the user got created when creating issues from emails.

      com.atlassian.jira.service.util.handler.AbstractMessageHandler#createUserForReporter checks for the existence of the user, and if they cannot be found it tries to create a new one. The creating of users is handled by com.atlassian.core.user.UserUtils and it also does a look up of the username to see if it exists before trying to create the user. None of this seems to be synchronized so it looks like that might be how the duplicate users were created.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              andrew.myers Andrew Myers [Atlassian]
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: