Thanks for the pointers in my earlier post. I have made some progress using
some sample code that uses annotations to start ldap server in JUnit tests.

http://svn.apache.org/viewvc/directory/apacheds/tags/2.0.0-M20/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java?revision=1676627&view=markup

However, I have run into another problem. Attempting to load the following
ldif entry
@ApplyLdifs(
    {
      "dn: dc=example,dc=com",
      "distinguishedName: dc=example,dc=com",
      "objectClass: top",
      "objectClass: domain",
      "dc: example",

....

causes
org.apache.directory.api.ldap.model.exception.LdapSchemaViolationException:
ERR_277 Attribute distinguishedname not declared in objectClasses of entry
dc=example,dc=com
        at
org.apache.directory.server.core.schema.SchemaInterceptor.assertAllAttributesAllowed(SchemaInterceptor.java:1393)
        at
org.apache.directory.server.core.schema.SchemaInterceptor.check(SchemaInterceptor.java:964)
        at
org.apache.directory.server.core.schema.SchemaInterceptor.add(SchemaInterceptor.java:1051)
        at
org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:422)
        at
org.apache.directory.server.core.exception.ExceptionInterceptor.add(ExceptionInterceptor.java:135)
        at
org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:422)
        at
org.apache.directory.server.core.admin.AdministrativePointInterceptor.add(AdministrativePointInterceptor.java:120


It appears distinguishedName is not a valid attribute type in the schema
being used. Is the code using the wrong schema type? I dont have deep
knowledge in RFC definitions, but I thought this was a standard attribute.

How do I resolve this issue? I need to have distinguishedName in my ldap
entries to be able to test the code.

Thanks in advance.
Naveen

Reply via email to