Announcement Announcement Module
No announcement yet. needs more than 10 minutes to fullfill Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • needs more than 10 minutes to fullfill

    Hello everybody,

    i have the problem that the filter-search string

    (&(sn=*A*)(givenName=*A*)(userAccount=*AAAAAAA*) ) needs more than 10 minutes to answer and my application service gets a TimeoutException because the response time is too long.

    Here is the code:

      public List findByUID(String firstName,String lastName,String accountId) {
          AndFilter filter = new AndFilter();
          final DistinguishedName dn = new DistinguishedName();
          if(accountId == null || accountId.equals("") || accountId.indexOf("*") > -1){
        	  filter.and(new WhitespaceWildcardsFilter("sn",lastName))
    		   .and(new WhitespaceWildcardsFilter("givenName",firstName));  
        	  filter.and(new WhitespaceWildcardsFilter("sn",lastName))
    			   .and(new WhitespaceWildcardsFilter("givenName",firstName))
    			   .and(new WhitespaceWildcardsFilter("userAccount",accountId));
          log.debug("DN: "+dn.toString());
          log.debug("Filter: "+filter.toString());
          log.debug("Encodierter Filterstring: "+filter.encode());
          List persons =, filter.encode(), getContextMapper());      
          return persons;

    Filter: (&(sn=*A*)(givenName=*A*)(userAccount=*AAAAAAA*) )
    Encodierter Filterstring: (&(sn=*A*)(givenName=*A*)(userAccount=*AAAAAAA*) )

    I work with Eclipse ganymede and switched on the debug - modus but this waitng time is in our productive environment as well. Spring version: spring-ldap-1.2.1.jar

    Is it possible that spring converts this search string to another slower search string/query?If i put this filter string directly in the ldap browser it works fine.
    Why does it take so long with this query?

    Did I do something wrong?
    Kind Regards, Nikita

  • #2
    Spring LDAP sends the query straight to JNDI. Try the same query using plain JNDI and see if you get the same behavior.