Friday, October 29, 2010

Avoiding issues with referrals in LDAP searches

If the target LDAP server contains referrals, especially broken ones, this may cause issues during LDAP searches.

If you switch "is there any more objects left" test from:
while (results != null && results.hasMore())
while (results != null && results.hasMoreElements())
this problem goes away.

When I have run into strange LDAP error messages I have found the LDAP Status Codes and JNDI Exceptions to be very helpful.

No comments:

Post a Comment