It's definitely a problem.

On 3/6/2018 5:03 PM, George S. wrote:
I looked at,String,SearchScope,String...) and it's a wrapper around a call to search using a SearchRequest, and constructing a EntryCursorImpl from the SearchCursor.

There seems to be something wrong in EntryCursorImpl. If I change my code to use a SearchRequest, then I get results in a SearchCursor and I can iterate over them.

Looking at the code, EntryCursorImpl implicitly calls searchCursor.available(), which is returning false because it appears response is not set until a call to next(). See SearchResultImpl line 117 or so.

public  Collection<Response>search(String  base,String... attributeNames)throws  LdapException{

    if  (attributeNames.length ==0){
        attributeNames =new  String[]{ "distinguishedName","objectClass","name", prop.getProperty("emailAddress","mail")};
    Collection<Response> entries =new  ArrayList<>();
    SearchRequest sr=new  SearchRequestImpl();
    sr.setBase(new  Dn(base));

    SearchCursor cursor =;
    // EntryCursor cursor=new EntryCursorImpl(scursor);

    if  (isDebugMode()){
        for  (String  s : attributeNames){
        if  (true  || cursor.available()){
        for  (Response entry: cursor){
    }  else  {
        if  (isDebugMode()){
            System.err.println("SearchResults came back null!");
    try  {
    }  catch  (IOException ioeClose){
    return  entries;

On 3/6/2018 4:27 PM, Emmanuel Lécharny wrote:

Le 07/03/2018 à 00:08, George S. a écrit :
and, just to throw in another point, I've got some other code using the
Novell LDAP API library and it is able to do the query, and I can use
JXplorer to browse the tree.

It's really looking like there's something wrong in the library.
Sorry, I missed the point. Removed the 'if ( cursor.available() )', it
should work.

George S.
*MH Software, Inc.*
Voice: 303 438 9585

Reply via email to