crowd synchronisation fails: duplicate key value violates unique constraint "uk_mem_parent_child_type"

{code}

2013-02-27 12:44:33,837 QuartzWorker-0 INFO ServiceRunner atlassian.crowd.directory.DbCachingRemoteDirectory synchronisation for directory 10400 starting

2013-02-27 12:44:33,837 QuartzWorker-0 INFO ServiceRunner atlassian.crowd.directory.DbCachingRemoteDirectory synchronisation for directory 10400 starting

2013-02-27 12:44:34,760 QuartzWorker-0 INFO ServiceRunner atlassian.crowd.directory.DbCachingRemoteDirectory failed synchronisation complete in 923ms

2013-02-27 12:44:34,760 QuartzWorker-0 INFO ServiceRunner atlassian.crowd.directory.DbCachingRemoteDirectory failed synchronisation complete in 923ms

2013-02-27 12:44:34,776 QuartzWorker-0 ERROR ServiceRunner atlassian.crowd.directory.DbCachingDirectoryPoller Error occurred while refreshing the cache for directory 10400 .

com.atlassian.jira.crowd.embedded.ofbiz.db.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: GenericEntity:Membership id,45575 membershipType,GROUP_USER lowerParentName,confluence-users parentId,25442 childId,68468 childName,alvinc lowerChildName,alvinc directoryId,10400 parentName,confluence-users (SQL Exception while executing the following:INSERT INTO public.cwd_membership (ID, parent_id, child_id, membership_type, group_type, parent_name, lower_parent_name, child_name, lower_child_name, directory_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint uk_mem_parent_child_type))

at com.atlassian.jira.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:167)

at com.atlassian.jira.crowd.embedded.ofbiz.OfBizInternalMembershipDao.createMembership(OfBizInternalMembershipDao.java:101)

at com.atlassian.jira.crowd.embedded.ofbiz.OfBizInternalMembershipDao.addUserToGroup(OfBizInternalMembershipDao.java:94)

at com.atlassian.jira.crowd.embedded.ofbiz.OfBizDelegatingMembershipDao.addUserToGroup(OfBizDelegatingMembershipDao.java:78)

at com.atlassian.crowd.directory.AbstractInternalDirectory.addUserToGroup(AbstractInternalDirectory.java:695)

at com.atlassian.crowd.directory.DbCachingRemoteChangeOperations.addUserToGroup(DbCachingRemoteChangeOperations.java:1151)

at com.atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations.addUserToGroup(DirectoryCacheImplUsingChangeOperations.java:187)

at com.atlassian.crowd.directory.ldap.cache.EventTokenChangedCacheRefresher.synchroniseChanges(EventTokenChangedCacheRefresher.java:115)

at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:609)

at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:63)

at com.atlassian.crowd.directory.DbCachingDirectoryPoller.pollChanges(DbCachingDirectoryPoller.java:50)

at com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJob.execute(DirectoryPollerJob.java:34)

at org.quartz.core.JobRunShell.run(JobRunShell.java:195)

at com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72)

at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)

Caused by: org.ofbiz.core.entity.GenericEntityException: while inserting: GenericEntity:Membership id,45575 membershipType,GROUP_USER lowerParentName,confluence-users parentId,25442 childId,68468 childName,alvinc lowerChildName,alvinc directoryId,10400 parentName,confluence-users (SQL Exception while executing the following:INSERT INTO public.cwd_membership (ID, parent_id, child_id, membership_type, group_type, parent_name, lower_parent_name, child_name, lower_child_name, directory_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint uk_mem_parent_child_type))

at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:136)

at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:101)

at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:64)

at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:487)

at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:467)

at org.ofbiz.core.entity.GenericValue.create(GenericValue.java:98)

at com.atlassian.jira.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:162)

... 14 more

2013-02-27 12:44:34,776 QuartzWorker-0 ERROR ServiceRunner atlassian.crowd.directory.DbCachingDirectoryPoller Error occurred while refreshing the cache for directory 10400 .

com.atlassian.jira.crowd.embedded.ofbiz.db.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: GenericEntity:Membership id,45575 membershipType,GROUP_USER lowerParentName,confluence-users parentId,25442 childId,68468 childName,alvinc lowerChildName,alvinc directoryId,10400 parentName,confluence-users (SQL Exception while executing the following:INSERT INTO public.cwd_membership (ID, parent_id, child_id, membership_type, group_type, parent_name, lower_parent_name, child_name, lower_child_name, directory_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint uk_mem_parent_child_type))

at com.atlassian.jira.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:167)

at com.atlassian.jira.crowd.embedded.ofbiz.OfBizInternalMembershipDao.createMembership(OfBizInternalMembershipDao.java:101)

at com.atlassian.jira.crowd.embedded.ofbiz.OfBizInternalMembershipDao.addUserToGroup(OfBizInternalMembershipDao.java:94)

at com.atlassian.jira.crowd.embedded.ofbiz.OfBizDelegatingMembershipDao.addUserToGroup(OfBizDelegatingMembershipDao.java:78)

at com.atlassian.crowd.directory.AbstractInternalDirectory.addUserToGroup(AbstractInternalDirectory.java:695)

at com.atlassian.crowd.directory.DbCachingRemoteChangeOperations.addUserToGroup(DbCachingRemoteChangeOperations.java:1151)

at com.atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations.addUserToGroup(DirectoryCacheImplUsingChangeOperations.java:187)

at com.atlassian.crowd.directory.ldap.cache.EventTokenChangedCacheRefresher.synchroniseChanges(EventTokenChangedCacheRefresher.java:115)

at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:609)

at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:63)

at com.atlassian.crowd.directory.DbCachingDirectoryPoller.pollChanges(DbCachingDirectoryPoller.java:50)

at com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJob.execute(DirectoryPollerJob.java:34)

at org.quartz.core.JobRunShell.run(JobRunShell.java:195)

at com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72)

at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)

Caused by: org.ofbiz.core.entity.GenericEntityException: while inserting: GenericEntity:Membership id,45575 membershipType,GROUP_USER lowerParentName,confluence-users parentId,25442 childId,68468 childName,alvinc lowerChildName,alvinc directoryId,10400 parentName,confluence-users (SQL Exception while executing the following:INSERT INTO public.cwd_membership (ID, parent_id, child_id, membership_type, group_type, parent_name, lower_parent_name, child_name, lower_child_name, directory_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint uk_mem_parent_child_type))

at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:136)

at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:101)

at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:64)

at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:487)

at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:467)

at com.atlassian.jira.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:162)

... 14 more

{code}

2 answers

0 votes
Yew Teck En Atlassian Team Feb 26, 2013

Hi Sorin,

It seems to related to this bug ticket: https://jira.atlassian.com/browse/JRA-27353

Did you have mix-case group name presented in JIRA instance or crowd or LDAP side(from crowd directory)?

Until you get a chance to upgrade to 5.2.7 (which is reported to fix the bug that tecken linked to), there is a work-around at https://confluence.atlassian.com/pages/viewpage.action?pageId=321257915

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,076 views 4 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you