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.