Hi,
I am using spring-ldap-1.3.0.
I am trying to find entries in an OpenDS ldap server.
I referred the following method from Spring ldap api
public List search(Name base,
String filter,
ContextMapper mapper)
The code snippet I use is as follows
The Spring configuration file is as followsCode:PersonLP4LDAP person = null; try { List<PersonLP4LDAP> people = ldapTemplateLP4.search("", "uid=328996863458585, ou=xxx, o=xxx, o=cp" , new PersonContextMapper()); if (people.size() > 0) { person = (PersonLP4LDAP) people.iterator().next(); } return person;
with this set up Ia m getting the org.springframework.ldap.NameNotFoundException: [LDAP: error code 32 - No Such Object]Code:<bean id="contextSourceLP4" class="org.springframework.ldap.core.support.LdapContextSource"> <property name="url" value="ldap://tsetsserver:389" /> <property name="base" value="o=cp" /> <property name="userDn" value="Directory Manager" /> <property name="password" value="pswd" /> </bean> <bean id="ldapTemplateLP4" class="org.springframework.ldap.core.LdapTemplate"> <constructor-arg ref="contextSourceLP4" /> </bean>
Can you please suggest me wht is the exact parameter I need to pass to the search method?
I need to get the uid entries from the LDAP.I have passed the entire root to search method.I have not passed the basedn as parameter to search method.
Kindly help me solve the problem ASAP


Reply With Quote