-1
我正在创建一个应用程序,我正在编写将连接到SunOne Directory Server的 LDAP客户端。用户输入属性,请选择 类型并输入值,我的应用程序将在SunOne的 上创建该用户。格式错误的“homePhone”属性值
当用户选择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目录Studio