I'm currently trying to lookup a user using LdapTemplate.lookup() but when looking at the log from my ldap server i see some strange output.
My lookup code is as follows:
LdapTemplate's base property has been set to "ou=PEOPLE,dc=org".
and the log output from the Ldap server:
Notice that I get an error code of 4 which means "Size limit exceeded" according to the Sun ldap documentation. But what I find stranger is that the search is performed twice which is obviously not good for performance.
[26/Oct/2009:11:21:34 +0100] conn=1303 op=3 SRCH base="ou=PEOPLE,dc=org" scope=1 filter="(objectClass=*)" attrs="objectClass"
[26/Oct/2009:11:21:34 +0100] conn=1303 op=3 RESULT err=4 tag=101 nentries=1 etime=0
[26/Oct/2009:11:21:34 +0100] conn=1303 op=4 SRCH base="uid=TUser,ou=PEOPLE,dc=org" scope=0 filter="(objectClass=*)" attrs=ALL
[26/Oct/2009:11:21:34 +0100] conn=1303 op=4 RESULT err=0 tag=101 nentries=1 etime=0
Can somebody please help explain this log output? Am I not using LdapTemplate properly?
Any help is much appreciated.