免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3181 | 回复: 2
打印 上一主题 下一主题

◎◎◎◎◎◎各位帮忙看看Error: netscape.ldap.LDAPException: error result (20); [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-07-20 10:09 |只看该作者 |倒序浏览
public static void main(String[] args) {

        // Set up the environment for creating the initial context
       
        LDAPConnection ld = null;
        int status = -1;
        try{
                ld = new LDAPConnection();
                /* Connect to server */
                String MY_HOST = "huyan.com";
                int MY_PORT = 16830;
                ld.connect( MY_HOST, MY_PORT );

                String MGR_DN = "cn=Directory Manager";
                String MGR_PW = "managers";
                ld.authenticate( MGR_DN, MGR_PW );
            int day[]={1,2};
            
                for(int j=0;j<=1;j++)
                {
                switch(day[j]){
                case 1:try{String ENTRYDN = "cn=LMN_Creation,dc=Conference,dc=com";

                /* Read all attributes */
                LDAPEntry findEntry = ld.read( ENTRYDN );
                             。。。}catch{。。。。。}

                                case2:try{
     String dn = "uid=huyan, ou=People, dc=Conference,dc=com";

                /* Specify the attributes of the entry */
                String objectclass_values[] = { "top",
                                                                                "person",
                                                                                "organizationalPerson",
                                                                                "inetOrgPerson" };...
                 }
            catch{。。。。}
                              }
             catch{..}
...............
}
这个程序调试的时候没有错误 ,但是运行的时候就出现下面的结果,哪位能帮帮忙指点迷津,小女子先谢过了!!

cn=LMN_Creation,dc=Conference,dc=com
        Attributes:
                l
                        hubei
                serialNumber
                        555-12456-AZ
                description
                        Allocation of  mixer  for a local  mixer network
                objectClass
                        top
                        device
                cn
                        LMN_Creation
                creatorsName
                        cn=directory manager
                modifiersName
                        cn=directory manager
                createTimestamp
                        20060713083003Z
                modifyTimestamp
                        20060713083003Z
Error: netscape.ldap.LDAPException: error result (20); Type or value exists
Error: netscape.ldap.LDAPException: error result (20); Type or value exists

论坛徽章:
0
2 [报告]
发表于 2006-07-21 10:27 |只看该作者
哪位高手帮忙看看呢?

论坛徽章:
0
3 [报告]
发表于 2006-07-21 11:26 |只看该作者
晕,这个问题还没解决啊

是不是你想放进去的值已经存在了

google下吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP