I am new to LDAP and Unbound ID SDK for Java and I have a problem with adding user roles from my application to my LDAP server (the roles are grouped in ou=roles,dc=test,dc=com and as part of the ou=roles subtree, each role should be an entry of type groupOfUniqueMembers).
However I encounterd the following problem:
ERROR ldap.service.LDAPService - LDAPException(resultCode=21 (invalid attribute syntax), errorMessage='uniqueMember: value #0 invalid per syntax', diagnosticMessage='uniqueMember: value #0 invalid per syntax')
The way I construct my AddRequest is as follows:
String[] ldifLines = {
"dn: ou=roles,dc=test,dc=com",
"objectClass: groupOfUniqueNames",
"uniqueMember: uid=test.user", // initialMember
"cn: Admin"
};
AddRequest request = new AddRequest(ldifLines);
connection.add(request); // <- this line throws the exception
P.S. connection is a LDAPConnection object ,that is properly connecting to my ldap server since SearchRequests and DeleteRequests execute fine, so the problem doesn't seem to be there (It could be the way my server is configured though !).
The server uses LDAP version 3.
If the information I provided is not sufficient, please point me to what more I should include.
Thanks in advance