directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Wiley <debio...@gmail.com>
Subject Re: Starting Embedded ApacheDS - Fails to Extract Schema?
Date Wed, 07 Apr 2010 02:28:21 GMT
It looks like I'm not home free yet. I'm following the example for embedding
ApacheDS, and the example's addPartition method seems to be broken as well.
The body of the method is this:
        JdbmPartition partition = new JdbmPartition();
        partition.setId( partitionId );
        partition.setSuffix( partitionDn );
        service.addPartition( partition );

        return partition;

This crashes in service.addPartition with this:
java.lang.NullPointerException
at
org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmStore.init(JdbmStore.java:269)
at
org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition.initialize(JdbmPartition.java:164)
at
org.apache.directory.server.core.partition.DefaultPartitionNexus.addContextPartition(DefaultPartitionNexus.java:916)
at
org.apache.directory.server.core.DefaultDirectoryService.addPartition(DefaultDirectoryService.java:597)
at
org.wileynet.slinad.embedded.EmbeddedADS.addPartition(EmbeddedADS.java:69)
at org.wileynet.slinad.embedded.EmbeddedADS.init(EmbeddedADS.java:113)
at org.wileynet.slinad.embedded.EmbeddedADS.<init>(EmbeddedADS.java:177)
at org.wileynet.slinad.embedded.EmbeddedADS.main(EmbeddedADS.java:192)

As far as I can tell, the problem is that JdbmStore.workingDirectory is
never initialized, leading to a NullPointerException when JdbmStore.init
tries to create it. JdbmStore has a setWorkingDirectory method... should I
be calling it or should it be populated along the way? I don't see how I
would populate it because I'm creating a JdbmPartition, and my code doesn't
have a way to get a reference to the JdbmStore reference, at least not
directly, as far as I can tell.

Thanks,
Andrew Wiley

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message