Announcement Announcement Module
Collapse
No announcement yet.
How to verify if a base is valid when Spring-LDAP ignores NameNotFoundException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to verify if a base is valid when Spring-LDAP ignores NameNotFoundException

    Because LdapTemplate.search() method silently ignored NameNotFoundException, so in our program we do not know if there is no entry in LDAP or the base is invalid when LdapTemplate.search() found nothing.

    How to solve it?

    Thanks

  • #2
    In order to verify the base DN you can do a lookup using that DN. That method will throw an exception if no entry is found.

    Comment

    Working...
    X