One example of 32 being returned would be if the BIND dn or search
base did not exist in an ldapsearch command. for example:
ldapsearch -h ldap.example.com -p 389 -D 'cn=directory manger' -w
password -b ou=people,dc=example,dc=com '(uid=abc*)' dn
Assume in this case that "directory manger" is supposed to be
"directory manager" (the root dn). If"cn=directory manger" did not
exist, then an err=32 would be returned.
On Oct 15, 2008, at 11:03 AM, Agarwal, Sharad wrote:
Thank you Terry!
It would be fair to say that the server that returns (LDAP Error 32)
for
this query is not behaving in a standards compliant way?
I am not an LDAP expert, and I tried searching the web to find an
authoritative source that I could cite to the VDS team. Can you guide
me?
Thanks,
Sharad
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2008 11:00 AM
To: Agarwal, Sharad
Cc: [email protected]
Subject: Re: [ldap] LDAP Error 32 v/s Empty Result Set
error code 32 means "no such object", not zero entries match a query.
On Oct 15, 2008, at 10:57 AM, Agarwal, Sharad wrote:
Hi All,
Is it standard behavior for an LDAP server to respond with (LDAP
Error
32) when a query is run that has no match?
I tried a zero result query with the embedded LDAP Server (that comes
with WebLogic). This query does not return LDAP Error 32, it just
returns an empty result set.
Code snippet:
~~~~
int ldapVersion = LDAPConnection.LDAP_V3;
int ldapPort = 27001;
String ldapHost = "fesbosbgdd33v3";
String loginDN =
"uid=vgnadmin,ou=people,ou=VgnLDAPRealm,dc=vgndomain";
String password = "password masked";
String searchBase = "ou=groups,ou=VgnLDAPRealm,dc=vgndomain";
String searchFilter =
"(&(uniquemember
=cn=Administrators,ou=groups,ou=VgnLDAPRealm,dc=vgndomai
n)(objectclass=groupOfUniqueNames))";
~~~~
Code output:
~~~~
searchResults.getCount() = 0
~~~~
The same kind of query against another LDAP interface (Oracle Virtual
Directory) returns LDAP Error 32.
~~~~
searchResults.getCount() = 0
Error: LDAPException: No Such Object (32) No Such Object
LDAPException: Server Message: LDAP Error 32 : No Such Object
LDAPException: Matched DN:
~~~~
I tried all kinds of queries (valid, invalid, meaningless) against
the
embedded LDAP, and each succeeded with either no result or the
correct
result.
Please advise,
Sharad
http://twitter.com/tgardner
"True glory consists in doing what deserves to be written; in writing
what deserves to be read" - Pliny the Elder
----
Mobile: +1 404 925 6385
AIM: NotEternalName
skype: Terry_J_Gardner
http://blogs.sun.com/terrygardner
http://twitter.com/tgardner
"One cannot plow a field by turning it over in one's mind."