This is the initial part of my effort to extend ApacheDS to use a different partition. I’m trying to essentially replicate existing ApacheDS classes but as my own classes. Once I’ve got the service starting using all my own classes then I can begin to modify them for my purposes.

 

First, I just made my own version of MutableBTreePartitionConfiguration, changing only the package and class names. Included a jar file with that new class in apache’s lib directory, modified server.xml to now create the example.com partition using my new partition configuration class, everything worked perfectly.

 

Next step, I don’t think we want a BTree-based implementation, so I tried to extend directly from PartitionConfiguration. In that class I attempted to pretty much duplicate the functionality in both MutableBTreeConfiguration and BTreePartitionConfiguration. I can’t seem to get this to work.

 

Here’s what I’m getting in apacheds’s rolling log:

 

[13:53:30] ERROR [org.apache.directory.daemon.Bootstrapper] - Failed on org.apache.directory.server.Service.init(InstallationLayout, String[])

org.apache.directory.server.core.interceptor.InterceptorException: Failed to initialize interceptor chain. [Root exception is java.lang.NullPointerException]

            at org.apache.directory.server.core.interceptor.InterceptorChain.init(InterceptorChain.java:257)

            at org.apache.directory.server.core.DefaultDirectoryService.initialize(DefaultDirectoryService.java:1006)

            at org.apache.directory.server.core.DefaultDirectoryService.startup(DefaultDirectoryService.java:254)

            at org.apache.directory.server.core.jndi.AbstractContextFactory.getInitialContext(AbstractContextFactory.java:123)

            at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)

            at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)

            at javax.naming.InitialContext.init(Unknown Source)

            at javax.naming.InitialContext.<init>(Unknown Source)

            at javax.naming.directory.InitialDirContext.<init>(Unknown Source)

            at org.apache.directory.server.Service.init(Service.java:96)

            at org.apache.directory.daemon.Bootstrapper.callInit(Bootstrapper.java:151)

            at org.apache.directory.daemon.ProcrunBootstrapper.prunsrvStart(ProcrunBootstrapper.java:65)

Caused by: java.lang.NullPointerException

            at org.apache.directory.server.core.partition.impl.btree.ExpressionEnumerator.enumConj(ExpressionEnumerator.java:250)

            at org.apache.directory.server.core.partition.impl.btree.ExpressionEnumerator.enumerate(ExpressionEnumerator.java:140)

            at org.apache.directory.server.core.partition.impl.btree.DefaultSearchEngine.search(DefaultSearchEngine.java:135)

            at org.apache.directory.server.core.partition.impl.btree.BTreePartition.search(BTreePartition.java:431)

            at org.apache.directory.server.core.partition.DefaultPartitionNexus.search(DefaultPartitionNexus.java:922)

            at org.apache.directory.server.core.authz.GroupCache.initialize(GroupCache.java:146)

            at org.apache.directory.server.core.authz.GroupCache.<init>(GroupCache.java:117)

            at org.apache.directory.server.core.authz.AuthorizationService.init(AuthorizationService.java:200)

            at org.apache.directory.server.core.interceptor.InterceptorChain.register0(InterceptorChain.java:419)

            at org.apache.directory.server.core.interceptor.InterceptorChain.register(InterceptorChain.java:378)

            at org.apache.directory.server.core.interceptor.InterceptorChain.init(InterceptorChain.java:243)

            ... 11 more

 

I’ve also attached the server.xml and java code for my new class. Any ideas what is going on?

 

Thanks,

 

Dan