• <small id='KEQjS'></small><noframes id='KEQjS'>

    <i id='KEQjS'><tr id='KEQjS'><dt id='KEQjS'><q id='KEQjS'><span id='KEQjS'><b id='KEQjS'><form id='KEQjS'><ins id='KEQjS'></ins><ul id='KEQjS'></ul><sub id='KEQjS'></sub></form><legend id='KEQjS'></legend><bdo id='KEQjS'><pre id='KEQjS'><center id='KEQjS'></center></pre></bdo></b><th id='KEQjS'></th></span></q></dt></tr></i><div id='KEQjS'><tfoot id='KEQjS'></tfoot><dl id='KEQjS'><fieldset id='KEQjS'></fieldset></dl></div>
      <bdo id='KEQjS'></bdo><ul id='KEQjS'></ul>
        <tfoot id='KEQjS'></tfoot>
        <legend id='KEQjS'><style id='KEQjS'><dir id='KEQjS'><q id='KEQjS'></q></dir></style></legend>

      1. 将用户添加到 ldap 时出现 ldap 错误代码 32

        Ldap error code 32 while adding user to ldap(将用户添加到 ldap 时出现 ldap 错误代码 32)
        • <bdo id='a4wgJ'></bdo><ul id='a4wgJ'></ul>
        • <i id='a4wgJ'><tr id='a4wgJ'><dt id='a4wgJ'><q id='a4wgJ'><span id='a4wgJ'><b id='a4wgJ'><form id='a4wgJ'><ins id='a4wgJ'></ins><ul id='a4wgJ'></ul><sub id='a4wgJ'></sub></form><legend id='a4wgJ'></legend><bdo id='a4wgJ'><pre id='a4wgJ'><center id='a4wgJ'></center></pre></bdo></b><th id='a4wgJ'></th></span></q></dt></tr></i><div id='a4wgJ'><tfoot id='a4wgJ'></tfoot><dl id='a4wgJ'><fieldset id='a4wgJ'></fieldset></dl></div>
        • <tfoot id='a4wgJ'></tfoot>

        • <small id='a4wgJ'></small><noframes id='a4wgJ'>

                <tbody id='a4wgJ'></tbody>

                  <legend id='a4wgJ'><style id='a4wgJ'><dir id='a4wgJ'><q id='a4wgJ'></q></dir></style></legend>

                  本文介绍了将用户添加到 ldap 时出现 ldap 错误代码 32的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我需要向我的 ldap 添加一个新用户条目.以下是我的代码:

                  I need to add a new user entry to my ldap. Following is my code:

                       javax.naming.Name name = new DistinguishedName("cn=" + userName +",ou=Users,dc=wso2,dc=org");
                  
                  
                       Attribute objectClass = new BasicAttribute("objectClass");
                          {
                           objectClass.add("top");
                           objectClass.add("inetOrgPerson");
                           objectClass.add("person");
                           objectClass.add("organizationalPerson");
                          }
                          Attributes userAttributes = new BasicAttributes();
                          userAttributes.put(objectClass);
                          userAttributes.put("cn", userName);
                          userAttributes.put("sn", "abctest");
                          userAttributes.put(ATTRIBUTE_USER_PASSWORD, password);
                          LdapTemplate ldapTemplate = (LdapTemplate) SpringBeanFactory
                                  .getBean("ldapTemplate");
                          ldapTemplate.bind(name, null, userAttributes);
                  

                  虽然在执行这段代码时出现以下异常:

                  Although when this piece of code is executed I get the following exception:

                   org.apache.cxf.interceptor.Fault: [LDAP: error code 32 - No Such Object];       
                   nested exception is javax.naming.NameNotFoundException: 
                   [LDAP: error code 32 -      No Such Object]; remaining name 'cn=myname,ou=Users,dc=wso2,dc=org'
                  

                  我正在遵循 http:///kaustuvmaji.blogspot.in/2014/12/simple-example-of-spring-ldap.html 用于代码.有人可以帮助我了解此错误的根本原因或正确的代码.

                  I am following the example specified at http://kaustuvmaji.blogspot.in/2014/12/simple-example-of-spring-ldap.html for the code. Can someone help me in understanding the root cause for this error or the right code.

                  推荐答案

                  这里的问题是路径 ou=Users,dc=wso2,dc=org 在你的 LDAP 树中不存在,所以你不能在那个路径上创建一个孩子.

                  The problem here is that the path ou=Users,dc=wso2,dc=org doesn't exist in your LDAP tree, so you cannot create a child at that path.

                  如果您为 ContextSource 指定了基本路径,代码中的所有 DN 都应省略该基本路径,因为所有路径都将相对于指定的基本路径.

                  If you specified a base path for your ContextSource that should be omitted from all DNs in code, as all paths will be relative to the specified base.

                  这篇关于将用户添加到 ldap 时出现 ldap 错误代码 32的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Compiling C++ for the JVM(为 JVM 编译 C++)
                  Compile to java bytecode (without using Java)(编译成java字节码(不使用Java))
                  How to drive C#, C++ or Java compiler to compute 1+2+3+...+1000 at compile time?(如何在编译时驱动 C#、C++ 或 Java 编译器计算 1+2+3+...+1000?)
                  Java ClassLoader: load same class twice(Java ClassLoader:两次加载相同的类)
                  How to debug .class files in ECLIPSE?(如何在 ECLIPSE 中调试 .class 文件?)
                  Java quot;The blank final field may not have been initializedquot; Anonymous Interface vs Lambda Expression(Java“可能尚未初始化空白的最终字段匿名接口与 Lambda 表达式)

                  <small id='IDyjC'></small><noframes id='IDyjC'>

                  • <bdo id='IDyjC'></bdo><ul id='IDyjC'></ul>
                      <tbody id='IDyjC'></tbody>
                    <legend id='IDyjC'><style id='IDyjC'><dir id='IDyjC'><q id='IDyjC'></q></dir></style></legend>

                            <i id='IDyjC'><tr id='IDyjC'><dt id='IDyjC'><q id='IDyjC'><span id='IDyjC'><b id='IDyjC'><form id='IDyjC'><ins id='IDyjC'></ins><ul id='IDyjC'></ul><sub id='IDyjC'></sub></form><legend id='IDyjC'></legend><bdo id='IDyjC'><pre id='IDyjC'><center id='IDyjC'></center></pre></bdo></b><th id='IDyjC'></th></span></q></dt></tr></i><div id='IDyjC'><tfoot id='IDyjC'></tfoot><dl id='IDyjC'><fieldset id='IDyjC'></fieldset></dl></div>
                            <tfoot id='IDyjC'></tfoot>