LDAP客户端绑定账户报错,有做过的帮忙看下
代码
LDAPConnection lc = new LDAPConnection(); try { lc.connect("bb.bb.com",389); System.out.println("1111111"); lc.bind(LDAPConnection.LDAP_V3,"CN=Test,OU=BBM,O=BBRA","123456789");//这里报错 System.out.println("22222222"); LDAPSearchResults rs = lc.search("CN=Test,OU=BBM,O=BBRA,"objectClass=dominoPerson",null,false); int count = 0; while(rs.hasMore()){ LDAPEntry entry = rs.next(); System.out.println(entry.getDN()); count++; } System.out.println("共有"+count+"条记录。"); } catch (LDAPException e) { System.err.print("连接异常! "); e.printStackTrace(); }