Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Duplicate entry '917507-2130025' for key 'cwd_unique_user_membership'

Paul August 24, 2012


I'm desperately trying to finalise the setup of Confluence/Crowd and JIRA and roll it out (we are in the process of buying the licenses now), but we've hit a roadblock and I need some help.

When trying to sync the Confluence users from our Crowd setup, we are getting the following exception and now we are stuck as many users that we need to setup can't be imported into Confluence. How do I rectify this?

Thanks in advance,


2012-08-24 19:24:43,933 INFO http-8090-4 embedded.admin.list.DirectoriesController sync User directory synchronisation requested: Crowd Server , type: CROWD

2012-08-24 19:24:43,938 INFO scheduler_Worker-6 synchroniseCache synchronisation for directory 1310721 starting

2012-08-24 19:24:44,507 ERROR scheduler_Worker-6 sf.hibernate.util.JDBCExceptionReporter logExceptions Duplicate entry '917507-2130025' for key 'cwd_unique_user_membership'

2012-08-24 19:24:44,508 ERROR scheduler_Worker-6 sf.hibernate.impl.SessionImpl execute Could not synchronize database state with session

2012-08-24 19:24:44,509 INFO scheduler_Worker-6 synchroniseCache failed synchronisation complete in 571ms

2012-08-24 19:24:44,512 ERROR scheduler_Worker-6 pollChanges Error occurred while refreshing the cache for directory 1310721 .

org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: com.atlassian.crowd.embedded.hibernate2.HibernateMembership#2163210 ; SQL ; Duplicate entry '917507-2130025' for key 'cwd_unique_user_membership'; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '917507-2130025' for key 'cwd_unique_user_membership'



at org.springframework.orm.hibernate.HibernateTransactionManager.convertJdbcAccessException(

at org.springframework.orm.hibernate.HibernateTransactionManager.convertHibernateAccessException(

at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(



at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(

at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(

at$Proxy1054.addUserToGroup(Unknown Source)







at org.springframework.scheduling.quartz.QuartzJobBean.execute(


at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool$

at org.quartz.simpl.SimpleThreadPool$

2 answers

1 accepted

5 votes
Answer accepted
Septa Cahyadiputra
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 24, 2012

Hi Paul,

Sometimes this kind of issue is caused by corrupted synchronization cache. The easiest way to solve this issue is to create a new directory in Confluence side that mapped the same configuration as the previously created Crowd directory and disable the previously created directory.

Hope it helps.

Septa Cahyadiputra

0 votes
Toby Jackson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 7, 2014

This describes an alternative approach where you simply change the existing settings and let Confluence reindex itself.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events