LDAP search throwing LDAPException 32 instead of returning empty results
Hi all,
I know this isn't quite a JNDI question, but it is directory related. I use the old Netscape LDAPJDK 4.1 for my directory 'stuff' against Active Directory.
The issue is that a search method that used to return an empty LDAPSearchResults object when the search filter didn't match any entries now throws an LDAPException 32 - NO_SUCH_OBJECT.What's changed, you ask? Well, I scaled back the authenticated user's (the user doing the search) rights to the OUs and sub-OUs in which they are searching. A user with "full control" rights doesn't get this exception - just an empty results object. Also, if the search filter does find something, the search works just fine, so the user does have the rights to read the objects.
My question: is the empty LDAPSearchResults normal behavior or is the LDAPException 32 normal behavior in the case where the search filter doesn't find anything? Is this one of those "it depends" kind of situations?
Thanks for any feedback you can provide.
Craig

