在LDAP中增加记录的问题 按Exception的信息,应该是我生成的记录信息不配置,可是我查过了ldap的Schema,觉得上面写的应该是够的了呀,难道我还是看错了?再说,这个例子是从sun网站下抄下来的,应该它本身是能运行的才对呀,我用的也是他们本身的iPlanet 5.1,应该说不会不兼容吧?有没有高手可以告诉我? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你的程序试图要往ldap里加入'uid=test,ou=myou,dc=my,dc=cn',可是它已经在ldap内存在了。你在程序内把他们的属性值换一下,就ok乐。 不,我用console看,并没有这个'uid=test,ou=myou,dc=my,dc=cn'改了后也是不行改成这样...String userP = "uid=test1,ou=myou,dc=my,dc=cn"; Attributes attrs = new BasicAttributes(); attrs.put("objectclass","inetOrgPerson"); // define objectclass of new enry attrs.put("uid","test1"); attrs.put("mail","[email protected]"); attrs.put("telephonenumber","555-555-5555"); DirContext subCtx = ctx.createSubcontext( userP, attrs ); ...也是不行啊 attrs.put("cn","youcn"); attrs.put("sn","yousn"); 呀,真的是少了,我昨天是怎么检查的啊...现在行了,谢谢 amandapan(amandapan) :) 这年头,连sun上的东西都不能信呀,我就因为太信sun,结果都没怎么检查,结果... 日期格式化 如何体现面向对象思想 关于TableModel的问题 质疑一次编译到处运行 各位大哥帮忙看一下这个链表的删除函数好吗?谢谢! jacorb的问题,帮忙看看吧 这样的对齐方式的人工实现的还是软件实现的? java中系统如何将一串二进制字符转换成float类型的数字 分享-判断两个List中的元素是否相同,递归 nutch2.2.1 如何过滤url地址? 能不能做在关闭connection后resultset依然存在? 学习java一段时间,却不知道该继续学习什么了,郁闷中。。。。
可是它已经在ldap内存在了。你在程序内把他们的属性值换一下,就ok乐。
...
String userP = "uid=test1,ou=myou,dc=my,dc=cn";
Attributes attrs = new BasicAttributes();
attrs.put("objectclass","inetOrgPerson"); // define objectclass of new enry
attrs.put("uid","test1");
attrs.put("mail","[email protected]");
attrs.put("telephonenumber","555-555-5555"); DirContext subCtx = ctx.createSubcontext( userP, attrs );
...也是不行啊
attrs.put("sn","yousn");