com.atlassian.crowd.embedded.ofbiz.db.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Membership][id,11072][membershipType,GROUP_USER][lowerParentName,dcc_users][parentId,10415][childId,10422][childName,MWong][lowerChildName,mwong][directoryId,10000][parentName,dcc_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 '10415-10422-GROUP_USER' for key 2))

Atlassian JIRA | Morgana Spindler [Atlassian] | 5 years ago
  1. 0

    Environment: - JIRA 4.3.x and/or Confluence 3.5.x with Crowd Connector - Crowd with LDAP/AD connectors As per your investigations, it does look like a mixed case username has somehow sneaked in to one of the directories. Sync in JIRA fail with: {code} 2011-06-08 13:10:47,968 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,11072][membershipType,GROUP_USER][lowerParentName,dcc_users][parentId,10415][childId,10422][childName,MWong][lowerChildName,mwong][directoryId,10000][parentName,dcc_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 '10415-10422-GROUP_USER' for key 2)) at com.atlassian.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:167) at com.atlassian.crowd.embedded.ofbiz.OfBizInternalMembershipDao.createMembership(OfBizInternalMembershipDao.java:112) at com.atlassian.crowd.embedded.ofbiz.OfBizInternalMembershipDao.addUserToGroup(OfBizInternalMembershipDao.java:105) at com.atlassian.crowd.embedded.ofbiz.OfBizDelegatingMembershipDao.addUserToGroup(OfBizDelegatingMembershipDao.java:71) at com.atlassian.crowd.embedded.ofbiz.OfBizDelegatingMembershipDao.addAllUsersToGroup(OfBizDelegatingMembershipDao.java:44) at com.atlassian.crowd.directory.CachingDirectory.addAllUsersToGroup(CachingDirectory.java:125) at com.atlassian.crowd.directory.DbCachingRemoteDirectoryCache.syncUserMembershipsForGroup(DbCachingRemoteDirectoryCache.java:671) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMembershipsForGroup(AbstractCacheRefresher.java:126) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:63) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:37) at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:645) at com.atlassian.crowd.manager.directory.DirectorySynchroniserHelperImpl.synchronise(DirectorySynchroniserHelperImpl.java:84) 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,11072][membershipType,GROUP_USER][lowerParentName,dcc_users][parentId,10415][childId,10422][childName,MWong][lowerChildName,mwong][directoryId,10000][parentName,dcc_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 '10415-10422-GROUP_USER' for key 2)) at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:156) at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:121) at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:63) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:489) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:469) at org.ofbiz.core.entity.GenericValue.create(GenericValue.java:77) at com.atlassian.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:162) ... 17 more {code} Sync in Confluence fail with: {code} 2011-06-09 14:53:37,054 ERROR [QuartzScheduler_Worker-2] [atlassian.crowd.directory.DbCachingDirectoryPoller] pollChanges Error occurred while refreshing the cache for directory [ 7405569 ]. java.lang.IllegalStateException: Found duplicate memberships for user in directory 7405569, group dcc_users, user JBaran at com.atlassian.crowd.embedded.hibernate2.HibernateMembershipDao$1.doInHibernate(HibernateMembershipDao.java:150) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337) at com.atlassian.crowd.embedded.hibernate2.HibernateMembershipDao.internalFindUserMembership(HibernateMembershipDao.java:137) at com.atlassian.crowd.embedded.hibernate2.HibernateMembershipDao.removeUserFromGroup(HibernateMembershipDao.java:109) at com.atlassian.confluence.user.crowd.CachedCrowdMembershipDao.removeUserFromGroup(CachedCrowdMembershipDao.java:93) at com.atlassian.crowd.directory.AbstractInternalDirectory.removeUserFromGroup(AbstractInternalDirectory.java:718) at com.atlassian.crowd.directory.DbCachingRemoteChangeOperations.removeUserMembershipsForGroup(DbCachingRemoteChangeOperations.java:684) at sun.reflect.GeneratedMethodAccessor393.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.atlassian.crowd.directory.$Proxy672.removeUserMembershipsForGroup(Unknown Source) at com.atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations.syncUserMembershipsForGroup(DirectoryCacheImplUsingChangeOperations.java:117) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMembershipsForGroup(AbstractCacheRefresher.java:126) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:63) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:37) at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:645) 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.DirectoryPollerJobBean.executeInternal(DirectoryPollerJobBean.java:29) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:199) at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool$1.run(ConfluenceQuartzThreadPool.java:14) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) {code} [Enforcing Lower-Case Usernames, Groups and Roles for an Application| http://confluence.atlassian.com/display/CROWD/Enforcing+Lower-Case+Usernames%2C+Groups+and+Roles+for+an+Application] disabling the existing Crowd directory and recreating it in JIRA/Confuence solves the problem.

    Atlassian JIRA | 5 years ago | Morgana Spindler [Atlassian]
    com.atlassian.crowd.embedded.ofbiz.db.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Membership][id,11072][membershipType,GROUP_USER][lowerParentName,dcc_users][parentId,10415][childId,10422][childName,MWong][lowerChildName,mwong][directoryId,10000][parentName,dcc_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 '10415-10422-GROUP_USER' for key 2))
  2. 0

    Environment: - JIRA 4.3.x and/or Confluence 3.5.x with Crowd Connector - Crowd with LDAP/AD connectors As per your investigations, it does look like a mixed case username has somehow sneaked in to one of the directories. Sync in JIRA fail with: {code} 2011-06-08 13:10:47,968 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,11072][membershipType,GROUP_USER][lowerParentName,dcc_users][parentId,10415][childId,10422][childName,MWong][lowerChildName,mwong][directoryId,10000][parentName,dcc_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 '10415-10422-GROUP_USER' for key 2)) at com.atlassian.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:167) at com.atlassian.crowd.embedded.ofbiz.OfBizInternalMembershipDao.createMembership(OfBizInternalMembershipDao.java:112) at com.atlassian.crowd.embedded.ofbiz.OfBizInternalMembershipDao.addUserToGroup(OfBizInternalMembershipDao.java:105) at com.atlassian.crowd.embedded.ofbiz.OfBizDelegatingMembershipDao.addUserToGroup(OfBizDelegatingMembershipDao.java:71) at com.atlassian.crowd.embedded.ofbiz.OfBizDelegatingMembershipDao.addAllUsersToGroup(OfBizDelegatingMembershipDao.java:44) at com.atlassian.crowd.directory.CachingDirectory.addAllUsersToGroup(CachingDirectory.java:125) at com.atlassian.crowd.directory.DbCachingRemoteDirectoryCache.syncUserMembershipsForGroup(DbCachingRemoteDirectoryCache.java:671) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMembershipsForGroup(AbstractCacheRefresher.java:126) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:63) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:37) at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:645) at com.atlassian.crowd.manager.directory.DirectorySynchroniserHelperImpl.synchronise(DirectorySynchroniserHelperImpl.java:84) 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,11072][membershipType,GROUP_USER][lowerParentName,dcc_users][parentId,10415][childId,10422][childName,MWong][lowerChildName,mwong][directoryId,10000][parentName,dcc_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 '10415-10422-GROUP_USER' for key 2)) at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:156) at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:121) at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:63) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:489) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:469) at org.ofbiz.core.entity.GenericValue.create(GenericValue.java:77) at com.atlassian.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:162) ... 17 more {code} Sync in Confluence fail with: {code} 2011-06-09 14:53:37,054 ERROR [QuartzScheduler_Worker-2] [atlassian.crowd.directory.DbCachingDirectoryPoller] pollChanges Error occurred while refreshing the cache for directory [ 7405569 ]. java.lang.IllegalStateException: Found duplicate memberships for user in directory 7405569, group dcc_users, user JBaran at com.atlassian.crowd.embedded.hibernate2.HibernateMembershipDao$1.doInHibernate(HibernateMembershipDao.java:150) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337) at com.atlassian.crowd.embedded.hibernate2.HibernateMembershipDao.internalFindUserMembership(HibernateMembershipDao.java:137) at com.atlassian.crowd.embedded.hibernate2.HibernateMembershipDao.removeUserFromGroup(HibernateMembershipDao.java:109) at com.atlassian.confluence.user.crowd.CachedCrowdMembershipDao.removeUserFromGroup(CachedCrowdMembershipDao.java:93) at com.atlassian.crowd.directory.AbstractInternalDirectory.removeUserFromGroup(AbstractInternalDirectory.java:718) at com.atlassian.crowd.directory.DbCachingRemoteChangeOperations.removeUserMembershipsForGroup(DbCachingRemoteChangeOperations.java:684) at sun.reflect.GeneratedMethodAccessor393.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.atlassian.crowd.directory.$Proxy672.removeUserMembershipsForGroup(Unknown Source) at com.atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations.syncUserMembershipsForGroup(DirectoryCacheImplUsingChangeOperations.java:117) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMembershipsForGroup(AbstractCacheRefresher.java:126) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:63) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:37) at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:645) 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.DirectoryPollerJobBean.executeInternal(DirectoryPollerJobBean.java:29) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:199) at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool$1.run(ConfluenceQuartzThreadPool.java:14) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) {code} [Enforcing Lower-Case Usernames, Groups and Roles for an Application| http://confluence.atlassian.com/display/CROWD/Enforcing+Lower-Case+Usernames%2C+Groups+and+Roles+for+an+Application] disabling the existing Crowd directory and recreating it in JIRA/Confuence solves the problem.

    Atlassian JIRA | 5 years ago | Morgana Spindler [Atlassian]
    com.atlassian.crowd.embedded.ofbiz.db.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Membership][id,11072][membershipType,GROUP_USER][lowerParentName,dcc_users][parentId,10415][childId,10422][childName,MWong][lowerChildName,mwong][directoryId,10000][parentName,dcc_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 '10415-10422-GROUP_USER' for key 2))
  3. 0

    We are running Crowd for user management, and before we integrated with our organizations larger Active Directories it was working fine. As soon as we integrated with a single large directory the following error began faulting and it is rendering Crowd useless. No user group updates are being recognized, new users have to be created in each application in order to be granted access, etc. The error below is thrown and causes the entire synchronize to be aborted. I am experiencing the exact behavior when doing a synchronize in Confluence as well (see my comments at https://jira.atlassian.com/browse/CONF-22631?focusedCommentId=264657#comment-264657): 2011-08-22 08:06:18,646 QuartzWorker-0 ERROR ServiceRunner [atlassian.crowd.directory.DbCachingDirectoryPoller] Error occurred while refreshing the cache for directory [ 10300 ]. com.atlassian.crowd.embedded.ofbiz.db.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Membership][id,223267][membershipType,GROUP_USER][lowerParentName,#abc dl-video ad escalation][parentId,50839][childId,36518][childName,karreece][lowerChildName,karreece][directoryId,10300][parentName,#ABC DL-Video Ad Escalation] (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 '50839-36518-GROUP_USER' for key 2)) at com.atlassian.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:167) at com.atlassian.crowd.embedded.ofbiz.OfBizInternalMembershipDao.createMembership(OfBizInternalMembershipDao.java:112) at com.atlassian.crowd.embedded.ofbiz.OfBizInternalMembershipDao.addUserToGroup(OfBizInternalMembershipDao.java:105) at com.atlassian.crowd.embedded.ofbiz.OfBizDelegatingMembershipDao.addUserToGroup(OfBizDelegatingMembershipDao.java:71) at com.atlassian.crowd.embedded.ofbiz.OfBizDelegatingMembershipDao.addAllUsersToGroup(OfBizDelegatingMembershipDao.java:44) at com.atlassian.crowd.directory.CachingDirectory.addAllUsersToGroup(CachingDirectory.java:125) at com.atlassian.crowd.directory.DbCachingRemoteDirectoryCache.syncUserMembershipsForGroup(DbCachingRemoteDirectoryCache.java:671) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMembershipsForGroup(AbstractCacheRefresher.java:126) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:63) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:37) at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:645) at com.atlassian.crowd.manager.directory.DirectorySynchroniserHelperImpl.synchronise(DirectorySynchroniserHelperImpl.java:84) 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,223267][membershipType,GROUP_USER][lowerParentName,#abc dl-video ad escalation][parentId,50839][childId,36518][childName,karreece][lowerChildName,karreece][directoryId,10300][parentName,#ABC DL-Video Ad Escalation] (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 '50839-36518-GROUP_USER' for key 2)) at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:156) at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:121) at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:63) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:489) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:469) at org.ofbiz.core.entity.GenericValue.create(GenericValue.java:77) at com.atlassian.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:162) ... 17 more

    Atlassian JIRA | 5 years ago | Sheppe Pharis
    com.atlassian.crowd.embedded.ofbiz.db.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Membership][id,223267][membershipType,GROUP_USER][lowerParentName,#abc dl-video ad escalation][parentId,50839][childId,36518][childName,karreece][lowerChildName,karreece][directoryId,10300][parentName,#ABC DL-Video Ad Escalation] (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 '50839-36518-GROUP_USER' for key 2))
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    We are running Crowd for user management, and before we integrated with our organizations larger Active Directories it was working fine. As soon as we integrated with a single large directory the following error began faulting and it is rendering Crowd useless. No user group updates are being recognized, new users have to be created in each application in order to be granted access, etc. The error below is thrown and causes the entire synchronize to be aborted. I am experiencing the exact behavior when doing a synchronize in Confluence as well (see my comments at https://jira.atlassian.com/browse/CONF-22631?focusedCommentId=264657#comment-264657): 2011-08-22 08:06:18,646 QuartzWorker-0 ERROR ServiceRunner [atlassian.crowd.directory.DbCachingDirectoryPoller] Error occurred while refreshing the cache for directory [ 10300 ]. com.atlassian.crowd.embedded.ofbiz.db.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Membership][id,223267][membershipType,GROUP_USER][lowerParentName,#abc dl-video ad escalation][parentId,50839][childId,36518][childName,karreece][lowerChildName,karreece][directoryId,10300][parentName,#ABC DL-Video Ad Escalation] (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 '50839-36518-GROUP_USER' for key 2)) at com.atlassian.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:167) at com.atlassian.crowd.embedded.ofbiz.OfBizInternalMembershipDao.createMembership(OfBizInternalMembershipDao.java:112) at com.atlassian.crowd.embedded.ofbiz.OfBizInternalMembershipDao.addUserToGroup(OfBizInternalMembershipDao.java:105) at com.atlassian.crowd.embedded.ofbiz.OfBizDelegatingMembershipDao.addUserToGroup(OfBizDelegatingMembershipDao.java:71) at com.atlassian.crowd.embedded.ofbiz.OfBizDelegatingMembershipDao.addAllUsersToGroup(OfBizDelegatingMembershipDao.java:44) at com.atlassian.crowd.directory.CachingDirectory.addAllUsersToGroup(CachingDirectory.java:125) at com.atlassian.crowd.directory.DbCachingRemoteDirectoryCache.syncUserMembershipsForGroup(DbCachingRemoteDirectoryCache.java:671) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMembershipsForGroup(AbstractCacheRefresher.java:126) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:63) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:37) at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:645) at com.atlassian.crowd.manager.directory.DirectorySynchroniserHelperImpl.synchronise(DirectorySynchroniserHelperImpl.java:84) 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,223267][membershipType,GROUP_USER][lowerParentName,#abc dl-video ad escalation][parentId,50839][childId,36518][childName,karreece][lowerChildName,karreece][directoryId,10300][parentName,#ABC DL-Video Ad Escalation] (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 '50839-36518-GROUP_USER' for key 2)) at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:156) at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:121) at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:63) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:489) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:469) at org.ofbiz.core.entity.GenericValue.create(GenericValue.java:77) at com.atlassian.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:162) ... 17 more

    Atlassian JIRA | 5 years ago | Sheppe Pharis
    com.atlassian.crowd.embedded.ofbiz.db.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Membership][id,223267][membershipType,GROUP_USER][lowerParentName,#abc dl-video ad escalation][parentId,50839][childId,36518][childName,karreece][lowerChildName,karreece][directoryId,10300][parentName,#ABC DL-Video Ad Escalation] (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 '50839-36518-GROUP_USER' for key 2))
  6. 0

    Steps to recreate: * In Active Directory, create a group with a description > 255 characters * Set a user directory in JIRA against said Active Directory * Synchronise For any group with a large description, something like the following will be spit out in the log: {code} com.atlassian.crowd.embedded.ofbiz.db.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Group][id,13837][groupName,GroupWithLongDescription][updatedDate,2011-07-08 17:23:33.25][description,PSLSF11\DEPTS\TRNG\2 OPERATIONS TRAINING\APPROVED MATERIAL [R]; \\PSLSF11\DEPTS\TRNG\3 MAINT TRAINING\APPROVED MATERIAL [R]; PSLSF11\DEPTS\TRNG\4 TECH TRAINING\APPROVED MATERIAL [R]; PSLSF11\DEPTS\TRNG\5 CONFIG_ASSESSMENT\APPROVED MATERIALS [R]; PSLSF11\DEPTS\TRNG\7 GENERAL EMPLOYEE TRAINING\APPROVED MATERIAL [R]; PSLSF11\DEPTS\TRNG\11 NUC DIV TRNG [R]; PSLSF11\DEPTS\TRNG\12 LMS\APPROVED MATERIAL [R]][directoryId,10000][lowerDescription,pslsf11\depts\trng\2 operations training\approved material [r]; \\pslsf11\depts\trng\3 maint training\approved material [r]; pslsf11\depts\trng\4 tech training\approved material [r]; pslsf11\depts\trng\5 config_assessment\approved materials [r]; pslsf11\depts\trng\7 general employee training\approved material [r]; pslsf11\depts\trng\11 nuc div trng [r]; pslsf11\depts\trng\12 lms\approved material [r]][active,1][local,0][type,GROUP][lowerGroupName,GroupWithLongDescription][createdDate,2011-07-08 17:23:33.25] (SQL Exception while executing the following:INSERT INTO jiraschema.cwd_group (ID, group_name, lower_group_name, active, local, created_date, updated_date, description, lower_description, group_type, directory_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Data truncation)) at com.atlassian.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:167) at com.atlassian.crowd.embedded.ofbiz.OfBizGroupDao.add(OfBizGroupDao.java:158) at com.atlassian.crowd.embedded.ofbiz.OfBizGroupDao.add(OfBizGroupDao.java:144) at com.atlassian.crowd.embedded.ofbiz.OfBizGroupDao.addAll(OfBizGroupDao.java:136) at com.atlassian.crowd.directory.CachingDirectory.addAllGroups(CachingDirectory.java:109) at com.atlassian.crowd.directory.DbCachingRemoteDirectoryCache.addOrUpdateCachedGroups(DbCachingRemoteDirectoryCache.java:445) at com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher.synchroniseAllGroups(UsnChangedCacheRefresher.java:273) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:35) at com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher.synchroniseAll(UsnChangedCacheRefresher.java:209) at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:645) at com.atlassian.crowd.manager.directory.DirectorySynchroniserHelperImpl.synchronise(DirectorySynchroniserHelperImpl.java:84) 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:Group][id,13837][groupName,GroupWithLongDescription][updatedDate,2011-07-08 17:23:33.25][description,PSLSF11\DEPTS\TRNG\2 OPERATIONS TRAINING\APPROVED MATERIAL [R]; \\PSLSF11\DEPTS\TRNG\3 MAINT TRAINING\APPROVED MATERIAL [R]; PSLSF11\DEPTS\TRNG\4 TECH TRAINING\APPROVED MATERIAL [R]; PSLSF11\DEPTS\TRNG\5 CONFIG_ASSESSMENT\APPROVED MATERIALS [R]; PSLSF11\DEPTS\TRNG\7 GENERAL EMPLOYEE TRAINING\APPROVED MATERIAL [R]; PSLSF11\DEPTS\TRNG\11 NUC DIV TRNG [R]; PSLSF11\DEPTS\TRNG\12 LMS\APPROVED MATERIAL [R]][directoryId,10000][lowerDescription,pslsf11\depts\trng\2 operations training\approved material [r]; \\pslsf11\depts\trng\3 maint training\approved material [r]; pslsf11\depts\trng\4 tech training\approved material [r]; pslsf11\depts\trng\5 config_assessment\approved materials [r]; pslsf11\depts\trng\7 general employee training\approved material [r]; pslsf11\depts\trng\11 nuc div trng [r]; pslsf11\depts\trng\12 lms\approved material [r]][active,1][local,0][type,GROUP][lowerGroupName,GroupWithLongDescription][createdDate,2011-07-08 17:23:33.25] (SQL Exception while executing the following:INSERT INTO jiraschema.cwd_group (ID, group_name, lower_group_name, active, local, created_date, updated_date, description, lower_description, group_type, directory_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Data truncation)) at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:156) at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:121) at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:63) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:489) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:469) at org.ofbiz.core.entity.GenericValue.create(GenericValue.java:77) at com.atlassian.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:162) ... 16 more {code} Can I recommend one of the following? * Change DDL to make fields {{cwd_group.description}} and {{cwd_group.lower_description}} of type {{varchar(MAX)}}? * Change DB access code to auto-snip any descriptions > 255 characters? My workaround was modifying the DB schema like the first option. Of course, this is going to cause an issue on the next upgrade if I have to start with another empty JIRA database.

    Atlassian JIRA | 5 years ago | Chris Simmons
    com.atlassian.crowd.embedded.ofbiz.db.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Group][id,13837][groupName,GroupWithLongDescription][updatedDate,2011-07-08 17:23:33.25][description,PSLSF11\DEPTS\TRNG\2 OPERATIONS TRAINING\APPROVED MATERIAL [R]; \\PSLSF11\DEPTS\TRNG\3 MAINT TRAINING\APPROVED MATERIAL [R]; PSLSF11\DEPTS\TRNG\4 TECH TRAINING\APPROVED MATERIAL [R]; PSLSF11\DEPTS\TRNG\5 CONFIG_ASSESSMENT\APPROVED MATERIALS [R]; PSLSF11\DEPTS\TRNG\7 GENERAL EMPLOYEE TRAINING\APPROVED MATERIAL [R]; PSLSF11\DEPTS\TRNG\11 NUC DIV TRNG [R]; PSLSF11\DEPTS\TRNG\12 LMS\APPROVED MATERIAL [R]][directoryId,10000][lowerDescription,pslsf11\depts\trng\2 operations training\approved material [r]; \\pslsf11\depts\trng\3 maint training\approved material [r]; pslsf11\depts\trng\4 tech training\approved material [r]; pslsf11\depts\trng\5 config_assessment\approved materials [r]; pslsf11\depts\trng\7 general employee training\approved material [r]; pslsf11\depts\trng\11 nuc div trng [r]; pslsf11\depts\trng\12 lms\approved material [r]][active,1][local,0][type,GROUP][lowerGroupName,GroupWithLongDescription][createdDate,2011-07-08 17:23:33.25] (SQL Exception while executing the following:INSERT INTO jiraschema.cwd_group (ID, group_name, lower_group_name, active, local, created_date, updated_date, description, lower_description, group_type, directory_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Data truncation))

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.ofbiz.core.entity.GenericEntityException

      while inserting: [GenericEntity:Membership][id,11072][membershipType,GROUP_USER][lowerParentName,dcc_users][parentId,10415][childId,10422][childName,MWong][lowerChildName,mwong][directoryId,10000][parentName,dcc_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 '10415-10422-GROUP_USER' for key 2))

      at org.ofbiz.core.entity.GenericDAO.singleInsert()
    2. org.ofbiz.core
      GenericValue.create
      1. org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:156)
      2. org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:121)
      3. org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:63)
      4. org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:489)
      5. org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:469)
      6. org.ofbiz.core.entity.GenericValue.create(GenericValue.java:77)
      6 frames
    3. com.atlassian.crowd
      DirectoryPollerJob.execute
      1. com.atlassian.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:162)
      2. com.atlassian.crowd.embedded.ofbiz.OfBizInternalMembershipDao.createMembership(OfBizInternalMembershipDao.java:112)
      3. com.atlassian.crowd.embedded.ofbiz.OfBizInternalMembershipDao.addUserToGroup(OfBizInternalMembershipDao.java:105)
      4. com.atlassian.crowd.embedded.ofbiz.OfBizDelegatingMembershipDao.addUserToGroup(OfBizDelegatingMembershipDao.java:71)
      5. com.atlassian.crowd.embedded.ofbiz.OfBizDelegatingMembershipDao.addAllUsersToGroup(OfBizDelegatingMembershipDao.java:44)
      6. com.atlassian.crowd.directory.CachingDirectory.addAllUsersToGroup(CachingDirectory.java:125)
      7. com.atlassian.crowd.directory.DbCachingRemoteDirectoryCache.syncUserMembershipsForGroup(DbCachingRemoteDirectoryCache.java:671)
      8. com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMembershipsForGroup(AbstractCacheRefresher.java:126)
      9. com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:63)
      10. com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:37)
      11. com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:645)
      12. com.atlassian.crowd.manager.directory.DirectorySynchroniserHelperImpl.synchronise(DirectorySynchroniserHelperImpl.java:84)
      13. com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:63)
      14. com.atlassian.crowd.directory.DbCachingDirectoryPoller.pollChanges(DbCachingDirectoryPoller.java:50)
      15. com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJob.execute(DirectoryPollerJob.java:34)
      15 frames
    4. quartz
      JobRunShell.run
      1. org.quartz.core.JobRunShell.run(JobRunShell.java:195)
      1 frame
    5. com.atlassian.multitenant
      MultiTenantThreadPool$MultiTenantRunnable.run
      1. com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72)
      1 frame
    6. quartz
      SimpleThreadPool$WorkerThread.run
      1. org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      1 frame