#LDAP #LDAP Tools Plugin Hi, would any of you please be able to comment on the

#LDAP #LDAP Tools Plugin Hi, would any of you please be able to comment on the below mentioned behaviors which is with regards to batchSize and totalCount in fn!ldapsearch()?

1. Error if batch size is negative:
fn!ldapsearch() has been failing to evaluate when the batchSize is equal to -1. For instance, refer the attached pictures and you can find that the same fn!ldapsearch() executes well and returns when batchSize is positive(refer positive batch size.png) but throws an error when the batchSize is negative(refer negative batch size.png).

2. Zero Total Count:
totalCount is shown as zero even when one or more than one records are retrieved and again this can be inferred from the image(positive batch size.png) attached to the post.

Is the problem with the way I implemented fn!ldapsearch() or the LDAP vendor(I believe fn!ldapsearch() is really a best fit for AD) I am making use of? Any pointers are really appreci...

OriginalPostID-216556

OriginalPostID-216556

  Discussion posts and replies are publicly visible

Parents
  • Looking at the code I see this line sets the size limit for org.ldaptive.SearchRequest

    request.setSizeLimit(pagingInfo.getBatchSize());

    per the JavaDocs of this library the:

    sizeLimit: maximum number of entries to include in the search result; A value of 0 means includes all entries.

    Note how it says that 0 means "all entries". You should use that instead of -1.

    I am not the author of this plug-in but at a glance that's my take on this issue.
Reply
  • Looking at the code I see this line sets the size limit for org.ldaptive.SearchRequest

    request.setSizeLimit(pagingInfo.getBatchSize());

    per the JavaDocs of this library the:

    sizeLimit: maximum number of entries to include in the search result; A value of 0 means includes all entries.

    Note how it says that 0 means "all entries". You should use that instead of -1.

    I am not the author of this plug-in but at a glance that's my take on this issue.
Children
No Data