I am using APACHE DS api to add an entry into LDAP server. However, displayName attribute is not being added as is, instead "displayname" (all small caps) is being added. Below is my entry set:
Entry entry = new DefaultEntry(
"cn=" + cn + "," + this.base_dn,
"displayName",name.trim(),
"objectclass:top",
"objectclass:person",
"objectclass:inetOrgPerson",
"objectclass:organizationalPerson",
"cn",cn,
"sn",cn,
"description:Gerrit User",
"mail",cn +"@org.com",
"userPassword",password
);
Any idea why would this happen?
Ironically, when userPassword is mistakenly written as "userpassword", correct attribute name (which is "userPassword") gets into LDAP.
(Also, apache-ldap-api could not be found in tags below.)