Results 1 to 2 of 2

Thread: ldap in-memory testserver not finding modified attributes

  1. #1

    Default 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:

    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>();
    part of the ldif file read into the server:

    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
    Last edited by haiko; Jul 1st, 2008 at 10:49 AM. Reason: clarifying problem

  2. #2

    Red face update

    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •