fine,,,
Hi ulsa,
things went fine like this with the help of ldap browser
<property name="userDn" value="CN=test test,CN=Users,DC=dcsoft,DC=local" />
but i encountered a new exception:
org.springframework.ldap.PartialResultException: Unprocessed Continuation Reference(s); nested exception is javax.naming.PartialResultException: Unprocessed Continuation Reference(s); remaining name ''
and the SIIMPLE function that generated the exception is the following:
public List getAllContactNames() {
System.out.println("we are in getAllContactNames() method");
// return ldapTemplate.list("DC=dcsoft.local");
try {
return ldapTemplate.search("", "(objectclass=person)",
new AttributesMapper() {
public Object mapFromAttributes(Attributes attrs)
throws NamingException {
return attrs.get("cn").get();
}
});
}
catch (Exception e) {
System.out.println("we are in catch block :::");
e.printStackTrace();
return ldapTemplate.list("DC=dcsoft,DC=local");
}
}
public List getAllContactNames() {
System.out.println("we are in getAllContactNames() method");
try {
return ldapTemplate.search("", "(objectclass=person)",
new AttributesMapper() {
public Object mapFromAttributes(Attributes attrs)
throws NamingException {
return attrs.get("cn").get();
}
});
}
catch (Exception e) {
System.out.println("we are in catch block :::");
e.printStackTrace();
return ldapTemplate.list("DC=dcsoft,DC=local");
}
}
Solution is always there u have to find it