LDAP or CROWD Synchronization Fails with java.lang.IllegalStateException: Unable to rename user x to X
Synchronization fails and the following appears in
2013-10-14 13:13:56,551 ERROR [scheduler_Worker-3] [atlassian.crowd.directory.DbCachingDirectoryPoller] pollChanges Error occurred while refreshing the cache for directory [ 622595 ]. java.lang.IllegalStateException: Unable to rename user x to X
Username case in the cwd_user table is different than the one stored in LDAP.
Disable incremental synchronization for this user directory and re-run the full synchronization. You can expect it to be completed successfully.
If workaround 1 fails, please run the following SQL query to manually update the offending entry:
UPDATE cwd_user set user_name='X' WHERE user_name='x' AND directory_id != (SELECT id FROM cwd_directory WHERE directory_name='Confluence Internal Directory'); UPDATE user_mapping set username='X' WHERE username='x';
After that synchronize your user directory and it should complete successfully.