【发布时间】:2016-11-16 07:43:46
【问题描述】:
我正在创建一个应用程序,我在其中编写 LDAP 客户端,它将 连接到 SunOne 目录服务器。用户输入属性,选择 键入并输入值,我的应用程序将在 SunOne。
当用户选择homePhone,输入Integer并输入值22334546时,它会失败并出现以下异常
javax.naming.directory.InvalidAttributeValueException: Malformed 'homePhone' attribute value; remaining name 'cn=Identity3,ou=SunOU'
相同的代码是
for(...)
{
String attrName = attrRequest.getName();
Object attrVal = attrRequest.getValue();
BasicAttribute attribute = getBasicAttribute(attrName, attrVal);
attrs.put(attribute);
}
ldapCtx.bind(objectDN,null,attrs);
我可以使用 Apache directory Studio 创建这个用户
【问题讨论】:
标签: java ldap jndi ldap-query