Announcement Announcement Module
No announcement yet.
ldap in-memory testserver not finding modified attributes Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • ldap in-memory testserver not finding modified attributes

    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:

    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 =,
    				andFilter.encode(), getGroupContextMapper());
    		List<Role> roles = new ArrayList<Role>();
    part of the ldif file read into the server:

    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: [email protected],ou=people,dc=dtg,dc=nl
    uniqueMember: [email protected],ou=people,dc=dtg,dc=nl
    uniqueMember: [email protected],ou=people,dc=dtg,dc=nl
    Last edited by haiko; Jul 1st, 2008, 10:49 AM. Reason: clarifying problem

  • #2

    Found the problem, it was not something so fancy as I thought. The problem was an extra space in the base Name creating the users.