org.springframework.ldap.NameNotFoundException: [LDAP: error code 32 - No Such Object]; nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; blah name 'cn=BATCH ABEND REPORT,ou=Groups,o=blah.com'

Atlassian JIRA | Matthew Erickson [Atlassian] | 2 years ago
  1. 0

    This was reported by a customer with a very large number of users in there LDAP directory (300K+), running OpenLDAP with Confluence. The problem is that synchronisation takes many hours, and groups are constantly being created deleted etc in the directory. If a group is deleted while the memberships are being synchronised then an exception will be thrown and the synchronisation will not complete. Here is the error: {quote} 2014-10-08 17:59:53,698 ERROR [scheduler_Worker-9] [atlassian.crowd.directory.DbCachingDirectoryPoller] pollChanges Error occurred while refreshing the cache for directory [ 904953859 ]. org.springframework.ldap.NameNotFoundException: [LDAP: error code 32 - No Such Object]; nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; blah name 'cn=BATCH ABEND REPORT,ou=Groups,o=blah.com' at org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:174) at org.springframework.ldap.core.LdapTemplate.executeWithContext(LdapTemplate.java:810) at org.springframework.ldap.core.LdapTemplate.executeReadOnly(LdapTemplate.java:793) at org.springframework.ldap.core.LdapTemplate.lookup(LdapTemplate.java:935) at com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper$9.call(LdapTemplateWithClassLoaderWrapper.java:159) at com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper.invokeWithContextClassLoader(LdapTemplateWithClassLoaderWrapper.java:54) at com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper.lookup(LdapTemplateWithClassLoaderWrapper.java:155) at com.atlassian.crowd.directory.RFC4519Directory.findDirectMembersOfGroup(RFC4519Directory.java:938) at com.atlassian.crowd.directory.RFC4519DirectoryMembershipsIterable$2.apply(RFC4519DirectoryMembershipsIterable.java:77) at com.atlassian.crowd.directory.RFC4519DirectoryMembershipsIterable$2.apply(RFC4519DirectoryMembershipsIterable.java:69) at com.google.common.collect.Iterators$8.next(Iterators.java:782) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:126) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:82) at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:1008) at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:75) 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:20) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) Caused by: javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; r906680674ining name 'cn=BATCH ABEND REPORT,ou=Groups,o=hp.com' at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3112) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3033) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2840) at com.sun.jndi.ldap.LdapCtx.c_getAttributes(LdapCtx.java:1332) at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:231) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:139) at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:152) at sun.reflect.GeneratedMethodAccessor773.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.ldap.transaction.compensating.manager.TransactionAwareDirContextInvocationHandler.invoke(TransactionAwareDirContextInvocationHandler.java:92) at com.sun.proxy.$Proxy2058.getAttributes(Unknown Source) at org.springframework.ldap.core.LdapTemplate$17.executeWithContext(LdapTemplate.java:937) at org.springframework.ldap.core.LdapTemplate.executeWithContext(LdapTemplate.java:807) ... 19 more {quote} I was able to reproduce what I think is the same problem with ApacheDS and some help from the debugger. Reproduction steps: 1. Set up ApacheDS with some users and groups 2. In Confluence configure the user directory 3. Attach the debugger and set a breakpoint in AbstractCacheRefresher#synchroniseMemberships. I put the break point on like 121, after the call to getMemberships(groupsByName.keySet());, but before the code has started iterating through the memberships collection. 4. In confluence synchronise the directory 5. Wait for your breakpoint to be hit 6. Now delete one of the groups form your LDAP directory 7. Now allow the process to continue 8. Observe that the synchronisation fails with LDAP error code 32.

    Atlassian JIRA | 2 years ago | Matthew Erickson [Atlassian]
    org.springframework.ldap.NameNotFoundException: [LDAP: error code 32 - No Such Object]; nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; blah name 'cn=BATCH ABEND REPORT,ou=Groups,o=blah.com'
  2. 0

    This was reported by a customer with a very large number of users in there LDAP directory (300K+), running OpenLDAP with Confluence. The problem is that synchronisation takes many hours, and groups are constantly being created deleted etc in the directory. If a group is deleted while the memberships are being synchronised then an exception will be thrown and the synchronisation will not complete. Here is the error: {quote} 2014-10-08 17:59:53,698 ERROR [scheduler_Worker-9] [atlassian.crowd.directory.DbCachingDirectoryPoller] pollChanges Error occurred while refreshing the cache for directory [ 904953859 ]. org.springframework.ldap.NameNotFoundException: [LDAP: error code 32 - No Such Object]; nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; blah name 'cn=BATCH ABEND REPORT,ou=Groups,o=blah.com' at org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:174) at org.springframework.ldap.core.LdapTemplate.executeWithContext(LdapTemplate.java:810) at org.springframework.ldap.core.LdapTemplate.executeReadOnly(LdapTemplate.java:793) at org.springframework.ldap.core.LdapTemplate.lookup(LdapTemplate.java:935) at com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper$9.call(LdapTemplateWithClassLoaderWrapper.java:159) at com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper.invokeWithContextClassLoader(LdapTemplateWithClassLoaderWrapper.java:54) at com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper.lookup(LdapTemplateWithClassLoaderWrapper.java:155) at com.atlassian.crowd.directory.RFC4519Directory.findDirectMembersOfGroup(RFC4519Directory.java:938) at com.atlassian.crowd.directory.RFC4519DirectoryMembershipsIterable$2.apply(RFC4519DirectoryMembershipsIterable.java:77) at com.atlassian.crowd.directory.RFC4519DirectoryMembershipsIterable$2.apply(RFC4519DirectoryMembershipsIterable.java:69) at com.google.common.collect.Iterators$8.next(Iterators.java:782) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:126) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:82) at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:1008) at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:75) 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:20) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) Caused by: javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; r906680674ining name 'cn=BATCH ABEND REPORT,ou=Groups,o=hp.com' at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3112) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3033) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2840) at com.sun.jndi.ldap.LdapCtx.c_getAttributes(LdapCtx.java:1332) at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:231) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:139) at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:152) at sun.reflect.GeneratedMethodAccessor773.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.ldap.transaction.compensating.manager.TransactionAwareDirContextInvocationHandler.invoke(TransactionAwareDirContextInvocationHandler.java:92) at com.sun.proxy.$Proxy2058.getAttributes(Unknown Source) at org.springframework.ldap.core.LdapTemplate$17.executeWithContext(LdapTemplate.java:937) at org.springframework.ldap.core.LdapTemplate.executeWithContext(LdapTemplate.java:807) ... 19 more {quote} I was able to reproduce what I think is the same problem with ApacheDS and some help from the debugger. Reproduction steps: 1. Set up ApacheDS with some users and groups 2. In Confluence configure the user directory 3. Attach the debugger and set a breakpoint in AbstractCacheRefresher#synchroniseMemberships. I put the break point on like 121, after the call to getMemberships(groupsByName.keySet());, but before the code has started iterating through the memberships collection. 4. In confluence synchronise the directory 5. Wait for your breakpoint to be hit 6. Now delete one of the groups form your LDAP directory 7. Now allow the process to continue 8. Observe that the synchronisation fails with LDAP error code 32.

    Atlassian JIRA | 2 years ago | Matthew Erickson [Atlassian]
    org.springframework.ldap.NameNotFoundException: [LDAP: error code 32 - No Such Object]; nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; blah name 'cn=BATCH ABEND REPORT,ou=Groups,o=blah.com'
  3. 0

    LDAP not woking in delegated LDAP configuration in JIRA 4.3.4 - Atlassian Answers

    atlassian.com | 1 year ago
    javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001CD, problem 2001 (NO_OBJECT), data 0, best match of: 'DC=igglobal,DC=com' ]; remaining name 'cn=user,dc=igglobal,dc=com'
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    h4. Symptoms If using an incremental sync, and on the directory server the location of a group is changed, then on the next sync, it will fail. This affects Crowd, and all applications using Embedded Crowd. An error like below will be shown in the logs: {code:none} 2013-09-09 14:49:36,754 scheduler_Worker-8 ERROR [atlassian.crowd.directory.DbCachingRemoteDirectory] Incremental synchronisation was unexpectedly interrupted, falling back to a full synchronisation org.springframework.ldap.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001CD, problem 2001 (NO_OBJECT), data 0, best match of: 'OU=Groups,DC=sydney,DC=atlassian,DC=com' ]; nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001CD, problem 2001 (NO_OBJECT), data 0, best match of: 'OU=Groups,DC=sydney,DC=atlassian,DC=com' ]; remaining name 'cn=another test,ou=groups,dc=sydney,dc=atlassian,dc=com' at org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:174) at org.springframework.ldap.core.LdapTemplate.executeWithContext(LdapTemplate.java:810) at org.springframework.ldap.core.LdapTemplate.executeReadOnly(LdapTemplate.java:793) at org.springframework.ldap.core.LdapTemplate.lookup(LdapTemplate.java:935) at com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper$9.call(LdapTemplateWithClassLoaderWrapper.java:159) at com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper.invokeWithContextClassLoader(LdapTemplateWithClassLoaderWrapper.java:54) at com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper.lookup(LdapTemplateWithClassLoaderWrapper.java:155) at com.atlassian.crowd.directory.RFC4519Directory.findDirectMembersOfGroup(RFC4519Directory.java:898) at com.atlassian.crowd.directory.RFC4519DirectoryMembershipsIterable$2.apply(RFC4519DirectoryMembershipsIterable.java:77) at com.atlassian.crowd.directory.RFC4519DirectoryMembershipsIterable$2.apply(RFC4519DirectoryMembershipsIterable.java:69) at com.google.common.collect.Iterators$8.next(Iterators.java:782) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:126) at com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher.synchroniseGroupChanges(UsnChangedCacheRefresher.java:258) at com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher.synchroniseChanges(UsnChangedCacheRefresher.java:81) at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:629) 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:113) at org.quartz.core.JobRunShell.run(JobRunShell.java:203) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) Caused by: javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001CD, problem 2001 (NO_OBJECT), data 0, best match of: 'OU=Groups,DC=sydney,DC=atlassian,DC=com' ]; remaining name 'cn=another test,ou=groups,dc=sydney,dc=atlassian,dc=com' at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3092) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3013) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2820) at com.sun.jndi.ldap.LdapCtx.c_getAttributes(LdapCtx.java:1312) at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:213) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:121) at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:133) at sun.reflect.GeneratedMethodAccessor342.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.ldap.transaction.compensating.manager.TransactionAwareDirContextInvocationHandler.invoke(TransactionAwareDirContextInvocationHandler.java:92) at com.sun.proxy.$Proxy154.getAttributes(Unknown Source) at org.springframework.ldap.core.LdapTemplate$17.executeWithContext(LdapTemplate.java:937) at org.springframework.ldap.core.LdapTemplate.executeWithContext(LdapTemplate.java:807) ... 19 more {code} h4. Workaround Use any version of Crowd that includes [CWD-3188|https://jira.atlassian.com/browse/CWD-3188], so that a failed incremental sync will fall back to a full sync.

    Atlassian JIRA | 3 years ago | David Mason
    javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001CD, problem 2001 (NO_OBJECT), data 0, best match of: 'OU=Groups,DC=sydney,DC=atlassian,DC=com' ]; remaining name 'cn=another test,ou=groups,dc=sydney,dc=atlassian,dc=com'
  6. 0

    h2. Problem summary If a group is renamed or removed on the LDAP server in the middle of a directory sync, the entire sync will fail/terminate with an LDAP error code 32, which means an object not found. In theory this can occur in any LDAP directory; in practice, this is more likely to impact instances that are connected to larger LDAP directories that can take a long time to sync. For our largest customers, the impact of this bug can be very profound since directory syncs typically take a long time even if successful. The longer it takes, the more likely there will be a change to a group in LDAP before the sync is finished, and therefore the more likely the sync will fail, repeatedly. This means that new LDAP data will not get cached until a long time later until Crowd is able to perform a successful sync. Ideally, Crowd would acknowledge this situation more gracefully, and move onto the next group instead of failing the entire sync. This also impacts all Atlassian applications that use Crowd libraries to sync to LDAP (Confluence, JIRA, Stash, etc). h2. Steps to reproduce # Configure a large LDAP structure that contains a lot of groups. (For reference: my LDAP server I tested with contained over 3000 groups.) # In Crowd, Configure a Connector to this LDAP server # Start a sync # Immediately change a group CN value in the LDAP server such that the DN is now changed (alternatively: delete the group altogether). This requires a bit of timing because you need to change it _after_ Crowd finishes its initial query that asks for a listing of remote groups: {code} 2015-03-13 19:20:52,913 CrowdUsnChangedCacheRefresher:thread-2 INFO [directory.ldap.cache.UsnChangedCacheRefresher] found [ 303 ] remote groups in [ 15014ms ] {code} # Crowd will eventually query for each individual group it found in the previous step. When it encounters the group you modified, the sync will fail because the DN it's looking for is not found. h2. Stacktrace In the stacktrace below, you can see that Crowd is attempting to query the group object at {{cn=examplegroup,ou=testing,dc=example,dc=com}}. However, by the time it gets to this part, that group no longer exists at that DN, and therefore the LDAP server returned with an error code 32. {code} 2015-03-13 19:21:46,588 scheduler_Worker-3 INFO [atlassian.crowd.directory.DbCachingRemoteDirectory] failed synchronisation complete for directory [ 360449 ] in [ 68690ms ] 2015-03-13 19:21:46,597 scheduler_Worker-3 ERROR [atlassian.crowd.directory.DbCachingDirectoryPoller] Error occurred while refreshing the cache for directory [ 360449 ]. org.springframework.ldap.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001CD, problem 2001 (NO_OBJECT), data 0, best match of: 'OU=testing,DC=example,DC=com' ]; nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001CD, problem 2001 (NO_OBJECT), data 0, best match of: 'OU=testing,DC=example,DC=com' ]; remaining name 'cn=examplegroup,ou=testing,dc=example,dc=com' at org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:183) at org.springframework.ldap.core.LdapTemplate.executeWithContext(LdapTemplate.java:820) at org.springframework.ldap.core.LdapTemplate.executeReadOnly(LdapTemplate.java:803) at org.springframework.ldap.core.LdapTemplate.lookup(LdapTemplate.java:935) at com.atlassian.crowd.directory.ldap.SpringLdapTemplateWrapper$9.timedCall(SpringLdapTemplateWrapper.java:286) at com.atlassian.crowd.directory.ldap.SpringLdapTemplateWrapper$TimedCallable.call(SpringLdapTemplateWrapper.java:124) at com.atlassian.crowd.directory.ldap.SpringLdapTemplateWrapper.invokeWithContextClassLoader(SpringLdapTemplateWrapper.java:87) at com.atlassian.crowd.directory.ldap.SpringLdapTemplateWrapper.lookup(SpringLdapTemplateWrapper.java:282) at com.atlassian.crowd.directory.RFC4519Directory.findDirectMembersOfGroup(RFC4519Directory.java:959) at com.atlassian.crowd.directory.MicrosoftActiveDirectory.findDirectMembersOfGroup(MicrosoftActiveDirectory.java:516) at com.atlassian.crowd.directory.RFC4519DirectoryMembershipsIterable$2.apply(RFC4519DirectoryMembershipsIterable.java:78) at com.atlassian.crowd.directory.RFC4519DirectoryMembershipsIterable$2.apply(RFC4519DirectoryMembershipsIterable.java:70) at com.google.common.collect.Iterators$8.next(Iterators.java:812) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:128) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:84) at com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher.synchroniseAll(UsnChangedCacheRefresher.java:161) at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:1120) at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy28.synchronise(Unknown Source) at com.atlassian.crowd.directory.DbCachingDirectoryPoller.pollChanges(DbCachingDirectoryPoller.java:50) at com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJobRunner.runJob(DirectoryPollerJobRunner.java:93) at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:135) at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:101) at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:80) at com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:32) at org.quartz.core.JobRunShell.run(JobRunShell.java:223) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) Caused by: javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001CD, problem 2001 (NO_OBJECT), data 0, best match of: 'OU=testing,DC=example,DC=com' ]; remaining name 'cn=examplegroup,ou=testing,dc=example,dc=com' at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3112) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3033) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2840) at com.sun.jndi.ldap.LdapCtx.c_getAttributes(LdapCtx.java:1332) at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:231) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:139) at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:152) at sun.reflect.GeneratedMethodAccessor359.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.ldap.transaction.compensating.manager.TransactionAwareDirContextInvocationHandler.invoke(TransactionAwareDirContextInvocationHandler.java:90) at com.sun.proxy.$Proxy383.getAttributes(Unknown Source) at org.springframework.ldap.core.LdapTemplate$17.executeWithContext(LdapTemplate.java:937) at org.springframework.ldap.core.LdapTemplate.executeWithContext(LdapTemplate.java:817) ... 37 more {code} h2. Workarounds * You can reduce the chance of this happening by limiting your LDAP sync scope (therefore reducing sync duration) by using a more specific DN or writing a more restrictive LDAP filter in your user directory configurations. * Enable the Incremental Sync option if your LDAP structure supports it, to further reduce the sync time * If you have a large LDAP structure and are unable to restrict the sync scope, we [do not recommend|https://confluence.atlassian.com/display/DOC/User+Management+Limitations+and+Recommendations] using a Connector (syncing directory). Instead, use a [Delegated Authentication Directory|https://confluence.atlassian.com/display/CROWD/Configuring+a+Delegated+Authentication+Directory].

    Atlassian JIRA | 2 years ago | Robert Chang [Atlassian]
    javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001CD, problem 2001 (NO_OBJECT), data 0, best match of: 'OU=testing,DC=example,DC=com' ]; remaining name 'cn=examplegroup,ou=testing,dc=example,dc=com'

    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. javax.naming.NameNotFoundException

      [LDAP: error code 32 - No Such Object]; r906680674ining name 'cn=BATCH ABEND REPORT,ou=Groups,o=hp.com'

      at com.sun.jndi.ldap.LdapCtx.mapErrorCode()
    2. Java RT
      Method.invoke
      1. com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3112)
      2. com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3033)
      3. com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2840)
      4. com.sun.jndi.ldap.LdapCtx.c_getAttributes(LdapCtx.java:1332)
      5. com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:231)
      6. com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:139)
      7. javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:152)
      8. sun.reflect.GeneratedMethodAccessor773.invoke(Unknown Source)
      9. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      10. java.lang.reflect.Method.invoke(Method.java:606)
      10 frames
    3. spring-ldap-core
      TransactionAwareDirContextInvocationHandler.invoke
      1. org.springframework.ldap.transaction.compensating.manager.TransactionAwareDirContextInvocationHandler.invoke(TransactionAwareDirContextInvocationHandler.java:92)
      1 frame
    4. com.sun.proxy
      $Proxy2058.getAttributes
      1. com.sun.proxy.$Proxy2058.getAttributes(Unknown Source)
      1 frame
    5. spring-ldap-core
      LdapTemplate.lookup
      1. org.springframework.ldap.core.LdapTemplate$17.executeWithContext(LdapTemplate.java:937)
      2. org.springframework.ldap.core.LdapTemplate.executeWithContext(LdapTemplate.java:807)
      3. org.springframework.ldap.core.LdapTemplate.executeReadOnly(LdapTemplate.java:793)
      4. org.springframework.ldap.core.LdapTemplate.lookup(LdapTemplate.java:935)
      4 frames
    6. com.atlassian.crowd
      RFC4519DirectoryMembershipsIterable$2.apply
      1. com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper$9.call(LdapTemplateWithClassLoaderWrapper.java:159)
      2. com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper.invokeWithContextClassLoader(LdapTemplateWithClassLoaderWrapper.java:54)
      3. com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper.lookup(LdapTemplateWithClassLoaderWrapper.java:155)
      4. com.atlassian.crowd.directory.RFC4519Directory.findDirectMembersOfGroup(RFC4519Directory.java:938)
      5. com.atlassian.crowd.directory.RFC4519DirectoryMembershipsIterable$2.apply(RFC4519DirectoryMembershipsIterable.java:77)
      6. com.atlassian.crowd.directory.RFC4519DirectoryMembershipsIterable$2.apply(RFC4519DirectoryMembershipsIterable.java:69)
      6 frames
    7. Guava
      Iterators$8.next
      1. com.google.common.collect.Iterators$8.next(Iterators.java:782)
      1 frame
    8. com.atlassian.crowd
      DirectoryPollerJobBean.executeInternal
      1. com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:126)
      2. com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:82)
      3. com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:1008)
      4. com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:75)
      5. com.atlassian.crowd.directory.DbCachingDirectoryPoller.pollChanges(DbCachingDirectoryPoller.java:50)
      6. com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJobBean.executeInternal(DirectoryPollerJobBean.java:29)
      6 frames
    9. Spring Context Support
      QuartzJobBean.execute
      1. org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
      1 frame
    10. quartz
      JobRunShell.run
      1. org.quartz.core.JobRunShell.run(JobRunShell.java:199)
      1 frame
    11. com.atlassian.confluence
      ConfluenceQuartzThreadPool$1.run
      1. com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool$1.run(ConfluenceQuartzThreadPool.java:20)
      1 frame
    12. quartz
      SimpleThreadPool$WorkerThread.run
      1. org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
      1 frame