javax.naming.InvalidNameException: [LDAP: error code 34 - Invalid DN Syntax]

Google Groups | ssrJazz | 5 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    LDAP requirements

    Google Groups | 5 years ago | ssrJazz
    javax.naming.InvalidNameException: [LDAP: error code 34 - Invalid DN Syntax]
  2. 0

    Authentication for a LDAP user with a '/' in CN fails with a similar exception: {noformat} performing search: (CN=another/one) on dc=atlassian,dc=com (authenticated) LDAP: Initial connect and search successful, but authenticating user as '"cn=another/one,ou=users",dc=atlassian,dc=com' failed. javax.naming.InvalidNameException - [LDAP: error code 34 - Incorrect DN given : "cn=another/one,ou=users",dc=atlassian,dc=com (0x22 0x63 0x6E 0x3D 0x61 0x6E 0x6F 0x74 0x68 0x65 0x72 0x2F 0x6F 0x6E 0x65 0x2C 0x6F 0x75 0x3D 0x75 0x73 0x65 0x72 0x73 0x22 0x2C 0x64 0x63 0x3D 0x61 0x74 0x6C 0x61 0x73 0x73 0x69 0x61 0x6E 0x2C 0x64 0x63 0x3D 0x63 0x6F 0x6D ) is invalid] LDAP password check for another/one in 7ms {noformat} where cn='another/one' Logs: {quote} 12:37:18 ERROR - LDAP: Initial connect and search successful, but authenticating user as '"cn=another/one,ou=users",dc=atlassian,dc=com' failed. javax.naming.InvalidNameException: [LDAP: error code 34 - Incorrect DN given : "cn=another/one,ou=users",dc=atlassian,dc=com (0x22 0x63 0x6E 0x3D 0x61 0x6E 0x6F 0x74 0x68 0x65 0x72 0x2F 0x6F 0x6E 0x65 0x2C 0x6F 0x75 0x3D 0x75 0x73 0x65 0x72 0x73 0x22 0x2C 0x64 0x63 0x3D 0x61 0x74 0x6C 0x61 0x73 0x73 0x69 0x61 0x6E 0x2C 0x64 0x63 0x3D 0x63 0x6F 0x6D ) is invalid] at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2926) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2732) at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2646) at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193) at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136) at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.<init>(InitialContext.java:197) at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82) {quote}

    Atlassian JIRA | 7 years ago | Piotr Swiecicki [Atlassian]
    javax.naming.InvalidNameException: [LDAP: error code 34 - Incorrect DN given : "cn=another/one,ou=users",dc=atlassian,dc=com (0x22 0x63 0x6E 0x3D 0x61 0x6E 0x6F 0x74 0x68 0x65 0x72 0x2F 0x6F 0x6E 0x65 0x2C 0x6F 0x75 0x3D 0x75 0x73 0x65 0x72 0x73 0x22 0x2C 0x64 0x63 0x3D 0x61 0x74 0x6C 0x61 0x73 0x73 0x69 0x61 0x6E 0x2C 0x64 0x63 0x3D 0x63 0x6F 0x6D ) is invalid]
  3. 0

    Errors in OIM Provisioning with SunJavaSystemDirectoryServer -- Please help

    Oracle Community | 7 years ago | 768407
    javax.naming.InvalidNameException: [LDAP: error code 34 - Invalid DN]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Authentication for a LDAP user with a '/' in CN fails with a similar exception: {noformat} performing search: (CN=another/one) on dc=atlassian,dc=com (authenticated) LDAP: Initial connect and search successful, but authenticating user as '"cn=another/one,ou=users",dc=atlassian,dc=com' failed. javax.naming.InvalidNameException - [LDAP: error code 34 - Incorrect DN given : "cn=another/one,ou=users",dc=atlassian,dc=com (0x22 0x63 0x6E 0x3D 0x61 0x6E 0x6F 0x74 0x68 0x65 0x72 0x2F 0x6F 0x6E 0x65 0x2C 0x6F 0x75 0x3D 0x75 0x73 0x65 0x72 0x73 0x22 0x2C 0x64 0x63 0x3D 0x61 0x74 0x6C 0x61 0x73 0x73 0x69 0x61 0x6E 0x2C 0x64 0x63 0x3D 0x63 0x6F 0x6D ) is invalid] LDAP password check for another/one in 7ms {noformat} where cn='another/one' Logs: {quote} 12:37:18 ERROR - LDAP: Initial connect and search successful, but authenticating user as '"cn=another/one,ou=users",dc=atlassian,dc=com' failed. javax.naming.InvalidNameException: [LDAP: error code 34 - Incorrect DN given : "cn=another/one,ou=users",dc=atlassian,dc=com (0x22 0x63 0x6E 0x3D 0x61 0x6E 0x6F 0x74 0x68 0x65 0x72 0x2F 0x6F 0x6E 0x65 0x2C 0x6F 0x75 0x3D 0x75 0x73 0x65 0x72 0x73 0x22 0x2C 0x64 0x63 0x3D 0x61 0x74 0x6C 0x61 0x73 0x73 0x69 0x61 0x6E 0x2C 0x64 0x63 0x3D 0x63 0x6F 0x6D ) is invalid] at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2926) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2732) at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2646) at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193) at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136) at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.<init>(InitialContext.java:197) at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82) {quote}

    Atlassian JIRA | 7 years ago | Piotr Swiecicki [Atlassian]
    javax.naming.InvalidNameException: [LDAP: error code 34 - Incorrect DN given : "cn=another/one,ou=users",dc=atlassian,dc=com (0x22 0x63 0x6E 0x3D 0x61 0x6E 0x6F 0x74 0x68 0x65 0x72 0x2F 0x6F 0x6E 0x65 0x2C 0x6F 0x75 0x3D 0x75 0x73 0x65 0x72 0x73 0x22 0x2C 0x64 0x63 0x3D 0x61 0x74 0x6C 0x61 0x73 0x73 0x69 0x61 0x6E 0x2C 0x64 0x63 0x3D 0x63 0x6F 0x6D ) is invalid]
  6. 0

    hive+ldap LDAP: error code 34 - invalid DN - Cloudera Community

    cloudera.com | 7 months ago
    javax.security.sasl.SaslException: Error validating the login [Caused by javax.security.sasl.AuthenticationException: LDAP Authentication failed for user [Caused by javax.naming.InvalidNameException: [LDAP: error code 34 - invalid DN]]]

    Root Cause Analysis

    1. javax.naming.InvalidNameException

      [LDAP: error code 34 - Invalid DN Syntax]

      at com.sun.jndi.ldap.LdapCtx.processReturnCode()
    2. Java RT
      InitialDirContext.<init>
      1. com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2973)[na:1.6.0_22]
      2. com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2780)[na:1.6.0_22]
      3. com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2694)[na:1.6.0_22]
      4. com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:306)[na:1.6.0_22]
      5. com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:193)[na:1.6.0_22]
      6. com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:211)[na:1.6.0_22]
      7. com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:154)[na:1.6.0_22]
      8. com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:84)[na:1.6.0_22]
      9. javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)[na:1.6.0_22]
      10. javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)[na:1.6.0_22]
      11. javax.naming.InitialContext.init(InitialContext.java:240)[na:1.6.0_22]
      12. javax.naming.InitialContext.<init>(InitialContext.java:214)[na:1.6.0_22]
      13. javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:99)[na:1.6.0_22]
      13 frames
    3. org.openmeetings.app
      MainService.loginUser
      1. org.openmeetings.app.ldap.LdapAuthBase.authenticateUser(LdapAuthBase.java:103)[openmeetings.jar:na]
      2. org.openmeetings.app.ldap.LdapLoginManagement.doLdapLogin(LdapLoginManagement.java:376)[openmeetings.jar:na]
      3. org.openmeetings.app.remote.MainService.loginUser(MainService.java:346)[openmeetings.jar:na]
      3 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor372.invoke(UnknownSource)[na:na]
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.6.0_22]
      3. java.lang.reflect.Method.invoke(Method.java:616)[na:1.6.0_22]
      3 frames
    5. Red5
      RTMPMinaIoHandler.messageReceived
      1. org.red5.server.service.ServiceInvoker.invoke(ServiceInvoker.java:199)[red5.jar:na]
      2. org.red5.server.service.ServiceInvoker.invoke(ServiceInvoker.java:116)[red5.jar:na]
      3. org.red5.server.net.rtmp.RTMPHandler.invokeCall(RTMPHandler.java:160)[red5.jar:na]
      4. org.red5.server.net.rtmp.RTMPHandler.onInvoke(RTMPHandler.java:406)[red5.jar:na]
      5. org.red5.server.net.rtmp.BaseRTMPHandler.messageReceived(BaseRTMPHandler.java:134)[red5.jar:na]
      6. org.red5.server.net.rtmp.RTMPMinaIoHandler.messageReceived(RTMPMinaIoHandler.java:207)[red5.jar:na]
      6 frames
    6. Apache MINA Core
      DefaultIoFilterChain$EntryImpl$1.messageReceived
      1. org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:716)[mina-core-2.0.4.jar:na]
      2. org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)[mina-core-2.0.4.jar:na]
      3. org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)[mina-core-2.0.4.jar:na]
      4. org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)[mina-core-2.0.4.jar:na]
      5. org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:427)[mina-core-2.0.4.jar:na]
      6. org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:245)[mina-core-2.0.4.jar:na]
      7. org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)[mina-core-2.0.4.jar:na]
      8. org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)[mina-core-2.0.4.jar:na]
      9. org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)[mina-core-2.0.4.jar:na]
      9 frames
    7. Red5
      RTMPEIoFilter.messageReceived
      1. org.red5.server.net.rtmpe.RTMPEIoFilter.messageReceived(RTMPEIoFilter.java:125)[red5.jar:na]
      1 frame
    8. Apache MINA Core
      AbstractPollingIoProcessor$Processor.run
      1. org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)[mina-core-2.0.4.jar:na]
      2. org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)[mina-core-2.0.4.jar:na]
      3. org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)[mina-core-2.0.4.jar:na]
      4. org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)[mina-core-2.0.4.jar:na]
      5. org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)[mina-core-2.0.4.jar:na]
      6. org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)[mina-core-2.0.4.jar:na]
      7. org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:715)[mina-core-2.0.4.jar:na]
      8. org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:668)[mina-core-2.0.4.jar:na]
      9. org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:657)[mina-core-2.0.4.jar:na]
      10. org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:68)[mina-core-2.0.4.jar:na]
      11. org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1141)[mina-core-2.0.4.jar:na]
      11 frames
    9. MINA
      NamePreservingRunnable.run
      1. org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)[mina-core-2.0.4.jar:na]
      1 frame
    10. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[na:1.6.0_22]
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[na:1.6.0_22]
      3. java.lang.Thread.run(Thread.java:679)[na:1.6.0_22]
      3 frames