Details
-
Bug
-
Resolution: Won't Fix
-
High
-
None
-
4.0.2
-
4
-
Description
Normally, it is not possible to create duplicate users in JIRA. However, if using the SOAP Client-API then it is possible to create these duplicate users.
When this happens, then both the User Browser and Issue Navigator is inaccessible (even some functions that uses the User Browser i.e. multi user picket custom field).
A similar stack trace as the following will appear when browsing the above features:
2011-05-30 20:01:25,206 http-8330-Processor19 ERROR mche 72085x127x1 wz8jey /secure/admin/user/UserBrowser.jspa [action.admin.user.UserBrowser] Exception getting users: java.lang.RuntimeException: Found more than one user with name 'claire.rougier'; ids [GenericEntity:OSUser][id,10464][name,claire.rougier][passwordHash,x61Ey612Kl2gpFL56FT9weDnpSo4AV8j8+qx2AuTHdRyY036xxzTTrw10Wq3+4qQyB+XURPWx1ONxp3Y3pB37A==], [GenericEntity:OSUser][id,10463][name,claire.rougier][passwordHash,x61Ey612Kl2gpFL56FT9weDnpSo4AV8j8+qx2AuTHdRyY036xxzTTrw10Wq3+4qQyB+XURPWx1ONxp3Y3pB37A==] java.lang.RuntimeException: Found more than one user with name 'claire.rougier'; ids [GenericEntity:OSUser][id,10464][name,claire.rougier][passwordHash,x61Ey612Kl2gpFL56FT9weDnpSo4AV8j8+qx2AuTHdRyY036xxzTTrw10Wq3+4qQyB+XURPWx1ONxp3Y3pB37A==], [GenericEntity:OSUser][id,10463][name,claire.rougier][passwordHash,x61Ey612Kl2gpFL56FT9weDnpSo4AV8j8+qx2AuTHdRyY036xxzTTrw10Wq3+4qQyB+XURPWx1ONxp3Y3pB37A==] at com.opensymphony.user.provider.ofbiz.OFBizAbstractProvider.findUser(OFBizAbstractProvider.java:179) at com.opensymphony.user.provider.ofbiz.OFBizCredentialsProvider.handles(OFBizCredentialsProvider.java:144) at com.opensymphony.user.UserManager.getProvider(UserManager.java:269) at com.opensymphony.user.UserManager$Accessor.getCredentialsProvider(UserManager.java:347) at com.opensymphony.user.Entity.getCredentialsProvider(Entity.java:59) at com.opensymphony.user.User.<init>(User.java:52) at com.opensymphony.user.UserManager$Type$1.create(UserManager.java:47) at com.opensymphony.user.UserManager$Type$1.create(UserManager.java:45) at com.opensymphony.user.UserManager.buildEntity(UserManager.java:295) at com.opensymphony.user.UserManager.getEntities(UserManager.java:248) at com.opensymphony.user.UserManager.getUsers(UserManager.java:165) at com.atlassian.core.user.UserUtils.getAllUsers(UserUtils.java:65) at com.atlassian.jira.web.bean.UserBrowserFilter.getUsersFilteredByGroup(UserBrowserFilter.java:88) at com.atlassian.jira.web.bean.UserBrowserFilter.getFilteredUsers(UserBrowserFilter.java:55) at com.atlassian.jira.web.action.admin.user.UserBrowser.getBrowsableItems(UserBrowser.java:100) at com.atlassian.jira.web.action.admin.user.UserBrowser.doExecute(UserBrowser.java:55) at webwork.action.ActionSupport.execute(ActionSupport.java:153) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:59) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:141) at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:181) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46)
Workaround
- Run the following SQL query:
select * from userbase where username = 'claire.rougier';
Replace claire.rougier with the problematic username.
- You may get the following output:
+-------+----------------+------------------------------------------------------------------------------------------+ | ID | username | PASSWORD_HASH | +-------+----------------+------------------------------------------------------------------------------------------+ | 10464 | claire.rougier | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | | 10463 | claire.rougier | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | +-------+----------------+------------------------------------------------------------------------------------------+ 2 rows in set (0.00 sec)
- Delete the latest ID that is mapped to the username:
delete from userbase where ID=10464;
- Restart the instance.