[英]Getting org.springframework.ldap.NameNotFoundException: [LDAP: error code 32 - Parent entry not found in the directory.];
嗨,我正在使用Spring ldap在ldap中添加用戶。
我在應用程序上下文文件中指定了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>
有了這些規范,我就能成功地從LDAP中讀取用戶,也能夠列出LDAP中的所有用戶。 但是,當我嘗試使用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)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.