Hi folks,
we used the ApacheDS 1.5.4 for some unit tests. I like to upgrade the code
for 1.5.6, but it currently fails with a NPE at startup, because there's no
(no longer ?) automatically a system partition available. While there is a
call to set one, what do I have to do to initialize a default system
partition like the one used automatically in 1.5.4?
=============== %< ==============
final DirectoryService directoryService = new DefaultDirectoryService();
directoryService.setShutdownHookEnabled(false);
directoryService.setWorkingDirectory(workingDir);
directoryService.getChangeLog().setEnabled(false);
//directoryService.setSystemPartition(???); <=== What do I need here
final Partition partition = this.addPartition("test", BASE_DN);
directoryService.addPartition(partition);
this.addIndex(partition, "objectClass", "cn", "sn");
final LdapServer ldapServer = new LdapServer();
ldapServer.setDirectoryService(directoryService);
ldapServer.setAllowAnonymousAccess(true);
ldapServer.setSearchBaseDn(BASE_DN);
ldapServer.setTransports(new TcpTransport(port));
server = new ApacheDS(ldapServer);
server.startup();
=============== %< ==============
And - yes, we're still dealing with JUnit 3.x.
Thanks,
Jörg