Hello,

thanks for the help provided thus far. however I still struggling with the Apache DS. I tried to add a partition with

private void addPartition(DirectoryService service) {

AvlPartition partition = new AvlPartition(service.getSchemaManager());

        partition.setId("smpki");
        try {
partition.setSuffixDn(new Dn(service.getSchemaManager(), "dc=smpki"));
            //            AvlRdnIndex index = new AvlRdnIndex("2.5.4.3");
            //            partition.addIndex(index);
            partition.initialize();

            // create the context entry
Entry contextEntry = new DefaultEntry(service.getSchemaManager(), "dc=smpki", "objectClass: top",
                "objectClass: organizationalUnit", "ou: certificates");

            partition.add(new AddOperationContext(null, contextEntry));

            service.addPartition(partition);
        } catch (Exception e) {
            LOG.error("Error adding a partition", e);
throw new IllegalStateException("Error occurred adding partition!");
        }
    }

but now I'm getting the error

ERR_219 Entry dc=smpki contains no entryCsn attribute: Entry
    dn[n]: dc=smpki
    objectclass: top
    objectclass: organizationalUnit
    ou: certificates

After some further investigation I tried to add the index as shown in the code (the code with the AvlRdnIndex which had been commented out) but I still get the same error. All of the code examples I found in the net are incomplete or do not work due to a changed API for example since milestone M-3. I failed to attempt them. The user documentation of the Apache DS is of help but incomplete.

Could you please provide a complete example? The checked the following examples are all lacking in some way: http://joacim.breiler.com/apacheds/ch05.html ( helpful but failed to get it really done with milestones M-17) http://d.pr/n/2B0q (link is dead, it was mentioned by Kiran in an earlier thread about adding a partion from the beginning of 2014) The Apache DS user guide -> incomplete, especially in adding elements programmatically

I would be glad to use the Apache DS for parsing the requests. However as I have only 5 days left to integrate the functionality to parse LDAP requests I can not afford to waste any more time with fruitless attempts to get it running. If I do not get it managed to use the Apache DS I have to write my own ASN1 / LDAP message parser.

With regards Sebastian

Am 26.09.2014 13:20, schrieb Kiran Ayyagari:

...

Reply via email to