Announcement Announcement Module
Collapse
No announcement yet.
LDAP: error code 32 - No Such Object Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • LDAP: error code 32 - No Such Object

    hello

    when I tryig to insert too ldap this error occurs:

    Error occured javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'cn=Rahul, ou=People, dc=irisa, dc=com'

    what can I do?
    I dont now how to solve this problem.

    my code is:

    public void insertContact(ContactDTO contactDTO) {

    Attributes personAttributes = new BasicAttributes();
    BasicAttribute personBasicAttribute = new BasicAttribute("objectclass");
    personBasicAttribute.add("person");
    personAttributes.put(personBasicAttribute);
    personAttributes.put("cn", contactDTO.getCommonName());
    personAttributes.put("sn", contactDTO.getLastName());
    personAttributes.put("description", contactDTO.getDescription());

    DistinguishedName newContactDN = new DistinguishedName("dc=irisa,dc=com");
    newContactDN.add("ou","People");
    newContactDN.add("cn",contactDTO.getCommonName());

    ldapTemplate.bind(newContactDN, null, personAttributes);
    }


    I am new in spring-ldap.

  • #2
    The error you get is because the server can't find the parent node of the entry you are trying to create. A likely cause for this is that you have specified a base DN in your ContextSource configuration. If you have done so, the base DN must not be included in any other DNs:
    Code:
    DistinguishedName newContactDN = new DistinguishedName();
    newContactDN.add("ou","People");
    newContactDN.add("cn",contactDTO.getCommonName());
    If you have not specified a base DN in your configuration, the 'ou=People, dc=irisa, dc=com' node does not exist in your tree.

    Comment


    • #3
      similar problem

      i am having similar problem,
      i have upper hierarical entry as to be listed i.e.o=sql,c=RU
      I m facing the problem below :
      nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'cn=abc,o=sql,c=RU

      Comment


      • #4
        I tried the suggestion and it worked for me.

        Thanks!http://forum.springsource.org/images/icons/icon7.gif

        Comment

        Working...
        X