Announcement Announcement Module
Collapse
No announcement yet.
sub-tree - new user question Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • sub-tree - new user question

    Hello,

    I am just getting started with Spring LDAP. I am using the:

    ldapTemplate.lookup(String dn, AttributesMapper mapper)

    method to try and find a given object in our directory passing in a full dn. Unfortunately, I am receiving a name not found error. When I use an gui based ldap brower, I must do a sub-tree search to obtain the result I am looking for. Does the ldapTemplate do this by default?

    I also tried a similar query using the:

    Object searchForObject(Name base, String filter, ContextMapper mapper)

    method with similar results. Do I need to explicitly set the scope of a search?

    Thanks for your help.

  • #2
    Solved

    It appears that Spring LDAP does do sub-tree searches by default. After reading several threads on the forum, my problem was specifying a "base" value in my LdapContextSource definition and then again using a full DN. Based on what I have read, these two are additive resulting in duplication which causes the object not to be found.

    Comment

    Working...
    X