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

[1037 byte] By [heckle01a] at [2007-11-27 4:36:18]
# 1
When a search returns an LDAPException 32, it indicates that the BASE of the search cannot be located in the Directory Server. You may want to check the Base and possibly the additional error string (and Matched DN string) returned by the server.Regards,Ludovic.
ludovicpa at 2007-7-12 9:46:28 > top of Java-index,Core,Core APIs...
# 2

Thank you for your response, Ludovic. I really appreciate it.

As it turns out, it was a rights issue. The user doing the search did not have read rights to the search BASE due to changes in their own rights and those of an 'authenticated user'.

I just wanted to make sure I could convince the non-programmers that the NO_SUCH_OBJECT error was referring to something other than the search criteria not finding anything.

Thanks again!

Craig

heckle01a at 2007-7-12 9:46:28 > top of Java-index,Core,Core APIs...