hut
发贴: 7
积分: 0
|
于 2003-11-25 08:43
ldap服务器是 iplanet Directroy Server 5.1中文版。后缀是dc=mydomain,dc=com。 我写了个Person类,实现了DirContext接口。 public class Person implements DirContext { private Attributes newLdapUserAttrs = null; public Person(String uid,String pwd){ newLdapUserAttrs = new BasicAttributes(true); Attribute objClass = new BasicAttribute("objectClass"); objClass.add("inetorgperson"); objClass.add("organizationalPerson"); objClass.add("person"); objClass.add("top"); newLdapUserAttrs.put(objClass); newLdapUserAttrs.put("uid",uid); newLdapUserAttrs.put("userPassword",pwd); } } 然后在客户端调用 String dn = "uid=test,ou=People,dc=mydomain,dc=com"; Person p = new Person(uid,pwd); dirContext.bind(dn,p); 请问,为什么执行到bind这一步的时候,程序就不动了,没有错误抛出,程序好像死了一般,请问是什么缘故?如何解决?谢谢!
|