简体   繁体   English

获取org.springframework.ldap.NameNotFoundException:[LDAP:错误代码32-在目录中找不到父项。

[英]Getting org.springframework.ldap.NameNotFoundException: [LDAP: error code 32 - Parent entry not found in the directory.];

Hi I am using Spring ldap for adding user in ldap. 嗨,我正在使用Spring ldap在ldap中添加用户。

I have specified the context source of LDAP in application context file.... 我在应用程序上下文文件中指定了LDAP的上下文源。

<bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource">
<property name="url" value="ldap://brm-devoid-01.brocade.com:389"/>
<property name="base" value="ou=Users,dc=external,dc=brocade,dc=com"/>
<property name="userDn" value="cn=oracladmin"/>
<property name="password" value="mypassword"/>
</bean>

<bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate" >
<constructor-arg ref="contextSource"/>
</bean>

<bean id="activation" class="com.brocade.webportal.registration.service.ActivationImpl">
<property name="ldapTemplate" ref="ldapTemplate"/>
</bean>

With these specification in place, I am able to read a user from LDAP successfully also I am able to list all the user from LDAP. 有了这些规范,我就能成功地从LDAP中读取用户,也能够列出LDAP中的所有用户。 But when I am trying to add a user using ldapTemplate.bind() then I am getting following exception: 但是,当我尝试使用ldapTemplate.bind()添加用户时,出现以下异常:

org.springframework.ldap.NameNotFoundException: [LDAP: error code 32 - Parent entry not found in the directory.]; nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - Parent entry not found in the directory.]; remaining name 'brusertype=End User,brsupportuser=N,brprofileupdateflag=N,brresetflag=N,brsegment=GUEST,brrelationshiptype=GENERAL,cn=Dinesh Narayanan,sn=Narayanan,givenname=Dinesh,userpassword=password1,uid=testingspringldap2@intrado.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.executeReadWrite(LdapTemplate.java:802)
                at org.springframework.ldap.core.LdapTemplate.bind(LdapTemplate.java:996)
                at com.brocade.webportal.registration.service.ActivationImpl.activateUser(ActivationImpl.java:242)

Check out LDAP Error Codes 查看LDAP错误代码

Looks like 32 means: 看起来像32意味着:

Indicates the target object cannot be found. 指示找不到目标对象。 This code is not returned on following operations: * Search operations that find the search base but cannot find any entries that match the search filter. 以下操作不会返回此代码:*搜索操作可找到搜索库,但找不到与搜索过滤器匹配的任何条目。 * Bind operations. *绑定操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Spring LDAP LDAP:错误代码 32 - 0000208D - Spring Ldap LDAP: error code 32 - 0000208D Spring Boot LDAP Auth NameNotFoundException - Spring Boot LDAP Auth NameNotFoundException LDAP的春季安全性问题 错误代码32-没有这样的对象 - spring security issue with LDAP | error code 32 - No Such Object Spring LDAP 错误代码 32 - 无此类对象]; 剩下的名字'/'" - Spring LDAP error code 32 - No Such Object]; remaining name '/'" Spring LDAP:InvalidNameException:/:[LDAP:错误代码34 - Spring LDAP: InvalidNameException: /: [LDAP: error code 34 使用Spring ldap模板,如何在没有第二个ldap调用的情况下,设法获取存储在第一个找到的ldap条目的属性中的dn的ldap条目 - using spring ldap template how to manage to get ldap entry of dn stored in attribute of first found ldap entry without second ldap call Spring Security和Active Directory LDAP错误32问题2001(NO_OBJECT) - Spring Security & Active Directory LDAP Error 32 problem 2001 (NO_OBJECT) 未找到项目“org.springframework.boot:spring-boot-starter-parent:2.6.0-SNAPSHOT” - Getting Project 'org.springframework.boot:spring-boot-starter-parent:2.6.0-SNAPSHOT' not found Spring Security Active Directory LDAP 身份验证错误 - Spring Security Active directory LDAP Authentication error Spring Data LDAP Repository查找ldap条目 - Spring Data LDAP Repository finding ldap entry
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM