用Java ldap做一個(gè)域用戶某一個(gè)屬性信息修改功能LdapContext ctx = xxx; 已經(jīng)用域管理用戶連接上了,沒問題。ModificationItem modificationItem[] =new ModificationItem[1]; modificationItem[0] = new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("employeeID","123456")); //employeeID 是AD里面的一個(gè)屬性 ctx.modifyAttributes("uid=robert,cn=users,DC=SMNPC,DC=COM",modificationItem);//就是執(zhí)行 ctx.modifyAttributes 這句報(bào)錯(cuò) ,下面是報(bào)錯(cuò)的異常信息 Exception in thread "main" javax.naming.NamingException: [LDAP: error code 1 - 000004DC: LdapErr: DSID-0C090B22, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v1db1找了半天也不知道這個(gè)異常是什么原因造成的,求大家告知一下,順便有Java ldap修改AD屬性值的例子也可以分享一下給我唄
2 回答

回首憶惘然
TA貢獻(xiàn)1847條經(jīng)驗(yàn) 獲得超11個(gè)贊
錯(cuò)誤說是,當(dāng)前操作失敗是因?yàn)闆]有連接造成的,您確定ctx連接沒有關(guān)閉嗎?
添加回答
舉報(bào)
0/150
提交
取消