Menu

LDAPSearchException of size limit exceeded

IdM
2010-05-19
2013-06-13
  • IdM

    IdM - 2010-05-19

    Hello, dirmgr

    There is a list of 55159 uids which have entry in a ldap server.  Here is my code
    for (String uid : list) {
    try {
    entry = conn.searchForEntry(baseDN, SearchScope.ONE, filter, attributes);
    } catch (LDAPException e) {

    }
    }

    I got LDAPSearchException - result code is size limit exceeded. Although I got around it. But just curious what cause the exception?

     
  • Neil Wilson

    Neil Wilson - 2010-05-19

    If you get a size limit exceeded exception from the searchForEntry method, then that means that there were multiple entries in the server which matched the criteria of the search request.  The searchForEntry method expects there to be exactly one entry which matches the search criteria and will throw an exception if that is not the case.

     
  • IdM

    IdM - 2010-05-20

    Thanks you, SIR! You are always the best resources to get help. Yes, by searching uid in chucks, I found out indeed in the ldap server there are two entries have same uid. Good thing for us is the DN uses entryId instead of uid. We need to find out how this same uid could happen

     

Log in to post a comment.