Hi Peter!

Peter Horne wrote:
Thanks for the replies and I'll look forward to the updates. One place where you may want to start is with installer/apacheds-noarch. As I was trying to work out what was wrong with my code, I thought I'd get it (installer/apacheds-noarch) going and then make some exploratory changes. It worked fine after a maven build and running the apacheds.sh script. However when I removed arg[0] from the script (target/plan/server.xml) to make it use the defaults, it crashed with the same exception that my code had... Exception in thread "main" java.lang.NullPointerException at org.apache.directory.server.core.schema.DefaultSchemaService.initialize(DefaultSchemaService.java:382)
        at 
org.apache.directory.server.core.DefaultDirectoryService.initialize(DefaultDirectoryService.java:1425)
        at 
org.apache.directory.server.core.DefaultDirectoryService.startup(DefaultDirectoryService.java:907)



This is the same error I ran into when I tried to update the example for the custom partition example found here:

http://directory.apache.org/apacheds/1.5/61-how-to-write-a-simple-custom-partition-for-apacheds.html

Problem was the way I created the DirectoryService. The SchemaManager was missing afterwards.

Currently I do the following

...
DirectoryServiceFactory factory = DefaultDirectoryServiceFactory.DEFAULT;
factory.init("default");
DirectoryService directoryService = factory.getDirectoryService();
...

which works. There is a discussion on our dev-list about whether this is the intended and most easiest way to accomplish the task programmaticaly.

http://mail-archives.apache.org/mod_mbox/directory-dev/201003.mbox/%[email protected]%3e

Feel free to join the discussion. Sorry for the inconvenience.
Greetings from Bielefeld,
    StefanZ

Reply via email to