We have Confluence connected to Crowd directory for authentication. Crowd in turn pulls users from Microsoft AD. Every time existing user name is changed in AD for some reason the user fails to login with the following error:
org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2
at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:590)
And indeed Confluence has 2 user names for the same user although when I check on Crowd it has only 1 (new one). Even running full synchronization of Crowd directory on Confluence does not help. The only work around that helped is creating a new Crowd directory and replacing old one with the new one.
Is there an easier (better) way to work around this issue ? Looks like this issue persists for a while and I'm not sure if Atlassian is going to fix it. It becomes really annoying as it happens quite often when user was created in AD with one name but then had to be renamed.