Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
5.1.2
-
5.01
-
9
-
Severity 2 - Major
-
2
-
Description
JIRA throws error intermittently when Incremental Sync is enabled:
2012-12-21 22:54:17,216 QuartzWorker-1 INFO ServiceRunner [atlassian.crowd.directory.DbCachingRemoteDirectory] synchronisation for directory [ 10000 ] starting 2012-12-21 22:54:17,370 QuartzWorker-1 INFO ServiceRunner [atlassian.crowd.directory.DbCachingRemoteDirectory] failed synchronisation complete in [ 154ms ] 2012-12-21 22:54:17,423 QuartzWorker-1 ERROR ServiceRunner [atlassian.crowd.directory.DbCachingDirectoryPoller] Error occurred while refreshing the cache for directory [ 10000 ]. com.atlassian.crowd.embedded.ofbiz.db.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Membership][id,22478][membershipType,GROUP_USER][lowerParentName,jira-users][parentId,10113][childId,13679][childName,tynyyespz][lowerChildName,tynyyespz][directoryId,10000][parentName,jira-users] (SQL Exception while executing the following:INSERT INTO cwd_membership (ID, parent_id, child_id, membership_type, group_type, parent_name, lower_parent_name, child_name, lower_child_name, directory_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Duplicate entry '10113-13679-GROUP_USER' for key 'uk_mem_parent_child_type')) at com.atlassian.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:167) at com.atlassian.crowd.embedded.ofbiz.OfBizInternalMembershipDao.createMembership(OfBizInternalMembershipDao.java:97) at com.atlassian.crowd.embedded.ofbiz.OfBizInternalMembershipDao.addUserToGroup(OfBizInternalMembershipDao.java:90) at com.atlassian.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,22478][membershipType,GROUP_USER][lowerParentName,jira-users][parentId,10113][childId,13679][childName,tynyyespz][lowerChildName,tynyyespz][directoryId,10000][parentName,jira-users] (SQL Exception while executing the following:INSERT INTO cwd_membership (ID, parent_id, child_id, membership_type, group_type, parent_name, lower_parent_name, child_name, lower_child_name, directory_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Duplicate entry '10113-13679-GROUP_USER' for key 'uk_mem_parent_child_type')) at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:135) at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:100) 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.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:162)
Attach the screenshot and backup data that is used to reproduce the error.
This is currently reproducible with:
- JIRA 5.1.6
- Crowd 2.4.2
- 4000+ users
- 100+ groups
- Enable Incremental synchronisation
- 1 minute delay. Weren't able to determine if this is the root cause of the problem.
disabling the incremental sync and the synchronisation will be successful