Announcement Announcement Module
No announcement yet.
Spring-LDAP Sever Compatibility Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring-LDAP Sever Compatibility

    Question: Can I use SPRING-LDAP (ldaptemplate) to search any ldap server or does the server have to be one that supports a certain version (v2, v3?)

    I ask this question because while I can connect and search a server in my org using javax.naming, I cannot search the same server using ldaptemplate, or more specifically, the search does not return expected results.

    Note that I use ldaptemplate to connect/search two other ldap servers in my org and it works as expected, hence my question.

    I am using ldaptemplate 1.0.2 with JDK 1.4.2 on WinXP

    // I get results using this:
    NamingEnumeration results =, this.SEARCH_FILTER,
    new SearchControls().setSearchScope(SearchControls.ONE LEVEL_SCOPE));

    //no results using this when LdapContextSource is initialized using same variables used with DirContext example
    List listResults =, this.SEARCH_FILTER, SearchControls.ONELEVEL_SCOPE, new UofUAttributesMapper());

    Last edited by edillon; Jul 17th, 2006, 06:22 PM.

  • #2
    When you have an LDAPv2 server, you need to use the DirContextSource rather than the LdapContextSource.

    As it works with two of your servers, could it be that the other server is LDAPv2-only?