Apologies for reposting, but I don't see Emmanuel's reply in my email so
I'm not able to respond to his question, but I noticed he responded in the
archive.

*Original question*

I have an embedded ApacheDS instance configured and I'm trying to get it
running using a minimal LDIF configuration. I started with the sample
included in the ApacheDS jar file, but I get a LdapNoSuchAttributeException
exception.

Here's the sample LDIF file:


version: 1
dn: ou=schema
createtimestamp: 20090818022726Z
ou: schema
entrycsn: 20090818052725.311000Z#000000#000#000000
objectclass: organizationalUnit
objectclass: top
creatorsname: uid=admin,ou=system


And here's the error:

org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException:
ERR_04269 ATTRIBUTE_TYPE for OID objectclass does not exist!
    at
org.apache.directory.shared.ldap.schema.registries.DefaultAttributeTypeRegistry.lookup(DefaultAttributeTypeRegistry.java:291)
    at
org.apache.directory.shared.ldap.schema.registries.DefaultAttributeTypeRegistry.lookup(DefaultAttributeTypeRegistry.java:47)
    at
org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.lookupAttributeTypeRegistry(DefaultSchemaManager.java:1457)
    at
org.apache.directory.server.core.partition.avl.AvlStore.init(AvlStore.java:705)
    at
org.apache.directory.server.core.partition.avl.AvlPartition.doInit(AvlPartition.java:159)
    at
org.apache.directory.server.core.partition.AbstractPartition.initialize(AbstractPartition.java:65)
    at
org.apache.directory.server.core.partition.ldif.LdifPartition.doInit(LdifPartition.java:163)
    at
org.apache.directory.server.core.partition.AbstractPartition.initialize(AbstractPartition.java:65)
    at
org.apache.directory.server.core.schema.SchemaPartition.doInit(SchemaPartition.java:229)
    at
org.apache.directory.server.core.partition.AbstractPartition.initialize(AbstractPartition.java:65)
    at
org.apache.directory.server.core.DefaultDirectoryService.initialize(DefaultDirectoryService.java:1426)
    at
org.apache.directory.server.core.DefaultDirectoryService.startup(DefaultDirectoryService.java:907)

Can someone tell me what is causing this specific error?

*Emmanuel's reply*

You haven't embedded the default schema that contains the base
AttributeTypes and ObjectClasses needed for teh server to accept any entry.

What modules have you loaded in your embedded serrver ?

*Response*

I'm including the *apacheds-all* dependency, which contains the java
code itself, but I'm not sure if I'm including it correctly since the
DefaultDirectoryService wasn't copying any ldif files from the jar and
I had to extract them myself to the target directory.

    <dependency>
      <groupId>org.apache.directory.server</groupId>
      <artifactId>apacheds-all</artifactId>
      <version>1.5.7</version>
    </dependency>

Are there additional maven dependencies to include to get the default
schema?

Reply via email to