Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-967

Creating a subcontext is not possible with only a Name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.2, 1.5.0
    • 1.0.3, 1.5.1
    • None
    • None

    Description

      If one wants to create an entry using :
      ctx.createSubcontext( Name )

      the server fails, because it expect a cn attribute to be present. This is not good, as stated here : http://java.sun.com/products/jndi/jndi-ldap-gl.html#API
      DirContext.createSubcontext

      "...Perform an LDAP add operation to create the named entry and its associated attributes. If no attributes are supplied then the objectClass attribute is generated with the values top and javaContainer (javaContainer is a structural class that is necessary to avoid a schema violation error)..."

      This is due to the fact that the objectClass is not correctly added :
      attributes.put( JavaLdapSupport.OBJECTCLASS_ATTR, JavaLdapSupport.JCONTAINER_ATTR );
      attributes.put( JavaLdapSupport.OBJECTCLASS_ATTR, JavaLdapSupport.TOP_ATTR );

      the second attribute value replaces the first one.

      Attachments

        Activity

          People

            elecharny Emmanuel Lécharny
            elecharny Emmanuel Lécharny
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: