hi using spring ldap adding user in ldap.
i have specified context source of ldap in application context file....
<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, able read user ldap able list user ldap. when trying add user using ldaptemplate.bind() getting following exception:
org.springframework.ldap.namenotfoundexception: [ldap: error code 32 - parent entry not found in directory.]; nested exception javax.naming.namenotfoundexception: [ldap: error code 32 - parent entry not found in 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' @ org.springframework.ldap.support.ldaputils.convertldapexception(ldaputils.java:174) @ org.springframework.ldap.core.ldaptemplate.executewithcontext(ldaptemplate.java:810) @ org.springframework.ldap.core.ldaptemplate.executereadwrite(ldaptemplate.java:802) @ org.springframework.ldap.core.ldaptemplate.bind(ldaptemplate.java:996) @ com.brocade.webportal.registration.service.activationimpl.activateuser(activationimpl.java:242)
check out ldap error codes
looks 32
means:
indicates target object cannot found. code not returned on following operations: * search operations find search base cannot find entries match search filter. * bind operations.
Comments
Post a Comment