I have a test setup for testing my Ldap DAO object. I create, much like test setups in the spring-ldap-integration-tests project, an in memory LDAP from an apache DS instance (1.0.2). I load a ldif file with groups and people into the server.
Searching, creating and modifying people objects with ldaptemplate is no problem, but when I modify a group and search for the modified object, the modified attribute is not seen using a search with a filter. Browsing with a LDAP browser does see the correct modifications in the in-memory ldap server.
How can ldapTemplate not find an attribute while it is there according to the browser ??
It is as modifications in the group objects are not persisted in the LDAP.
When I do the same test against a normal ldap server, everything works fine.
This is how i do the search:
part of the ldif file read into the server:Code:AndFilter andFilter = new AndFilter(); andFilter.and(new EqualsFilter("objectClass", "groupOfUniqueNames")); andFilter.and(new EqualsFilter(UNIQUE_MEMBER, "uid=" + ldapUser.getUid() + ",ou=people,dc=dtg,dc=nl")); List<String> result = ldapTemplate.search(DistinguishedName.EMPTY_PATH, andFilter.encode(), getGroupContextMapper()); List<Role> roles = new ArrayList<Role>();
Code:dn: ou=groups,dc=dtg,dc=nl objectClass: top objectClass: organizationalUnit ou: groups dn: ou=people,dc=dtg,dc=nl objectClass: top objectClass: organizationalUnit ou: people dn: cn=standard,ou=groups,dc=dtg,dc=nl objectClass: top objectClass: groupOfUniqueNames cn: standard description: Standard Group uniqueMember: uid=standard_user,ou=people,dc=dtg,dc=nl uniqueMember: uid=pp_standaard@neteffect.nl,ou=people,dc=dtg,dc=nl uniqueMember: uid=vincent@neteffect.nl,ou=people,dc=dtg,dc=nl uniqueMember: uid=peter@neteffect.nl,ou=people,dc=dtg,dc=nl


Reply With Quote
