javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001A8, problem 2001 (NO_OBJECT), data 0, best match of: '' ]; remaining name ''

Spring JIRA | Marius Scurtescu | 8 years ago
  1. 0

    [LDAP-167] DefaultDirContextValidator errors with default empty base - Spring JIRA

    spring.io | 1 year ago
    javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001A8, problem 2001 (NO_OBJECT), data 0, best match of: '' ]; remaining name ''
  2. 0

    LDAP-167: DefaultDirContextValidator errors with default empty base

    GitHub | 8 years ago | spring-issuemaster
    javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001A8, problem 2001 (NO_OBJECT), data 0, best match of: '' ]; remaining name ''
  3. 0

    Using a plain DefaultDirContextValidator results in errors, with both Active Directory and Sun Directory Server. As soon as a valid base DN is set it works as expected. First a warning is logged: 14:05:50,355 WARN [DefaultDirContextValidator] DirContext 'javax.naming.ldap.InitialLdapContext@799f9a' failed validation with an exception. javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001A8, problem 2001 (NO_OBJECT), data 0, best match of: '' ]; remaining name '' at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3010) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2931) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2737) at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1808) at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1731) at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:368) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:338) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:321) at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:248) at org.springframework.ldap.pool.validation.DefaultDirContextValidator.validateDirContext(DefaultDirContextValidator.java:154) at org.springframework.ldap.pool.factory.DirContextPoolableObjectFactory.validateObject(DirContextPoolableObjectFactory.java:169) at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1035) at org.springframework.ldap.pool.factory.PoolingContextSource.getContext(PoolingContextSource.java:394) at org.springframework.ldap.pool.factory.PoolingContextSource.getReadOnlyContext(PoolingContextSource.java:374) at org.springframework.ldap.core.LdapTemplate.executeReadOnly(LdapTemplate.java:770) at org.springframework.ldap.core.LdapTemplate.lookup(LdapTemplate.java:897) [...] then an error: 14:05:50,358 ERROR [SequentialChannelRunner] Channel run error! Channel: channel1 org.springframework.dao.DataAccessResourceFailureException: Failed to borrow DirContext from pool.; nested exception is java.util.NoSuchElementException: Could not create a validated object at org.springframework.ldap.pool.factory.PoolingContextSource.getContext(PoolingContextSource.java:397) at org.springframework.ldap.pool.factory.PoolingContextSource.getReadOnlyContext(PoolingContextSource.java:374) at org.springframework.ldap.core.LdapTemplate.executeReadOnly(LdapTemplate.java:770) at org.springframework.ldap.core.LdapTemplate.lookup(LdapTemplate.java:897) [...] Caused by: java.util.NoSuchElementException: Could not create a validated object at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1049) at org.springframework.ldap.pool.factory.PoolingContextSource.getContext(PoolingContextSource.java:394) ... 9 more

    Spring JIRA | 8 years ago | Marius Scurtescu
    javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001A8, problem 2001 (NO_OBJECT), data 0, best match of: '' ]; remaining name ''
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Using a plain DefaultDirContextValidator results in errors, with both Active Directory and Sun Directory Server. As soon as a valid base DN is set it works as expected. First a warning is logged: 14:05:50,355 WARN [DefaultDirContextValidator] DirContext 'javax.naming.ldap.InitialLdapContext@799f9a' failed validation with an exception. javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001A8, problem 2001 (NO_OBJECT), data 0, best match of: '' ]; remaining name '' at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3010) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2931) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2737) at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1808) at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1731) at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:368) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:338) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:321) at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:248) at org.springframework.ldap.pool.validation.DefaultDirContextValidator.validateDirContext(DefaultDirContextValidator.java:154) at org.springframework.ldap.pool.factory.DirContextPoolableObjectFactory.validateObject(DirContextPoolableObjectFactory.java:169) at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1035) at org.springframework.ldap.pool.factory.PoolingContextSource.getContext(PoolingContextSource.java:394) at org.springframework.ldap.pool.factory.PoolingContextSource.getReadOnlyContext(PoolingContextSource.java:374) at org.springframework.ldap.core.LdapTemplate.executeReadOnly(LdapTemplate.java:770) at org.springframework.ldap.core.LdapTemplate.lookup(LdapTemplate.java:897) [...] then an error: 14:05:50,358 ERROR [SequentialChannelRunner] Channel run error! Channel: channel1 org.springframework.dao.DataAccessResourceFailureException: Failed to borrow DirContext from pool.; nested exception is java.util.NoSuchElementException: Could not create a validated object at org.springframework.ldap.pool.factory.PoolingContextSource.getContext(PoolingContextSource.java:397) at org.springframework.ldap.pool.factory.PoolingContextSource.getReadOnlyContext(PoolingContextSource.java:374) at org.springframework.ldap.core.LdapTemplate.executeReadOnly(LdapTemplate.java:770) at org.springframework.ldap.core.LdapTemplate.lookup(LdapTemplate.java:897) [...] Caused by: java.util.NoSuchElementException: Could not create a validated object at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1049) at org.springframework.ldap.pool.factory.PoolingContextSource.getContext(PoolingContextSource.java:394) ... 9 more

    Spring JIRA | 8 years ago | Marius Scurtescu
    javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001A8, problem 2001 (NO_OBJECT), data 0, best match of: '' ]; remaining name ''
  6. 0

    GitHub comment 29#163600214

    GitHub | 12 months ago | deada92
    org.springframework.security.authentication.InternalAuthenticationServiceException: [LDAP: error code 32 - LDAP Error 32 : No Such Object]; nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - LDAP Error 32 : No Such Object]; remaining name 'ou=users,dc=xxx,dc=de'

    2 unregistered visitors
    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 - 0000208D: NameErr: DSID-031001A8, problem 2001 (NO_OBJECT), data 0, best match of: '' ]; remaining name ''

      at com.sun.jndi.ldap.LdapCtx.mapErrorCode()
    2. Java RT
      InitialDirContext.search
      1. com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3010)
      2. com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2931)
      3. com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2737)
      4. com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1808)
      5. com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1731)
      6. com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:368)
      7. com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:338)
      8. com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:321)
      9. javax.naming.directory.InitialDirContext.search(InitialDirContext.java:248)
      9 frames
    3. spring-ldap-core
      DirContextPoolableObjectFactory.validateObject
      1. org.springframework.ldap.pool.validation.DefaultDirContextValidator.validateDirContext(DefaultDirContextValidator.java:154)
      2. org.springframework.ldap.pool.factory.DirContextPoolableObjectFactory.validateObject(DirContextPoolableObjectFactory.java:169)
      2 frames
    4. Commons Pool
      GenericKeyedObjectPool.borrowObject
      1. org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1035)
      1 frame
    5. spring-ldap-core
      LdapTemplate.lookup
      1. org.springframework.ldap.pool.factory.PoolingContextSource.getContext(PoolingContextSource.java:394)
      2. org.springframework.ldap.pool.factory.PoolingContextSource.getReadOnlyContext(PoolingContextSource.java:374)
      3. org.springframework.ldap.core.LdapTemplate.executeReadOnly(LdapTemplate.java:770)
      4. org.springframework.ldap.core.LdapTemplate.lookup(LdapTemplate.java:897)
      4 frames