1

こんにちは、LDAP にユーザーを追加するために Spring 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)
4

1 に答える 1

1

LDAP エラー コードを確認する

意味のように見え32ます:

対象のオブジェクトが見つからないことを示します。このコードは、次の操作では返されません: * 検索ベースを見つけるが、検索フィルターに一致するエントリを見つけることができない検索操作。*バインド操作。

于 2013-03-20T19:37:06.013 に答える