Hi again, that helped! Thanks a lot ;) Kind regards,
Markus Am 21.09.2015 um 12:13 schrieb Kiran Ayyagari: > do not initialize the partition in addPartition() method (comment out > partition.initialize()), > partitions will be _correctly_ initialized during DirectoryService startup > (i.e directoryService.startup() > in your code) > > On Mon, Sep 21, 2015 at 12:10 AM, Markus Zarbock <[email protected]> > wrote: > >> Greetings apacheds devs, >> >> I like using apacheds as ldap server for various projects - so first of >> all thanks for this great software ;) However now I'm trying to run a >> minimum apacheds programmatically. My goal is a preconfigured instance >> with some test users and groups that can be used for application >> testing. Unfortunately I'm running into an exception that I wasn't able >> to solve so far. I attached used code and below is an according excerpt >> of apacheds' log output. >> I am able to get a server up and running (can connect with DS Studio) >> but an exception (ERR_251_PARENT_NOT_FOUND) appears when I'm trying to >> insert a group entry. I inserted acoording partition and a domain >> entry, which works without errors. I assume that I missed something, so >> any help is very much appreciated. >> Thanks and kind regards, >> >> Markus >> >> [1] Used Maven dependency >> <dependency> >> <groupId>org.apache.directory.server</groupId> >> <artifactId>apacheds-all</artifactId> >> <version>2.0.0-M20</version> >> </dependency> >> >> [2] Log output >> [17:53:24] INFO [org.apache.directory.server.core.api.CacheService] - no >> custom cache configuration was set, loading the default cache configuration >> [17:53:33] INFO [org.apache.directory.server.core.api.CacheService] - >> fetching the cache named alias >> [17:53:33] INFO [org.apache.directory.server.core.api.CacheService] - No >> cache with name alias exists, creating one >> [17:53:33] INFO [org.apache.directory.server.core.api.CacheService] - >> fetching the cache named piar >> [17:53:33] INFO [org.apache.directory.server.core.api.CacheService] - No >> cache with name piar exists, creating one >> [17:53:33] INFO [org.apache.directory.server.core.api.CacheService] - >> fetching the cache named entryDn >> [17:53:33] INFO [org.apache.directory.server.core.api.CacheService] - No >> cache with name entryDn exists, creating one >> [17:53:33] WARN [org.apache.directory.api.ldap.model.ldif.LdifReader] - >> The ldif file is empty >> [17:53:33] INFO >> [org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex] - >> Setting CacheRecondManager's cache size to 100 >> [17:53:33] INFO >> [org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex] - >> Setting CacheRecondManager's cache size to 100 >> [17:53:33] INFO >> [org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex] - >> Setting CacheRecondManager's cache size to 100 >> [17:53:33] INFO >> [org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex] - >> Setting CacheRecondManager's cache size to 100 >> [17:53:33] INFO >> [org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex] - >> Setting CacheRecondManager's cache size to 100 >> [17:53:33] INFO >> [org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex] - >> Setting CacheRecondManager's cache size to 100 >> [17:53:33] INFO >> [org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition] >> - Setting CacheRecondManager's cache size to 100 >> [17:53:33] INFO >> [org.apache.directory.server.core.DefaultDirectoryService] - ApacheDS >> shutdown hook has been registered with the runtime. >> [17:53:33] INFO [org.apache.directory.server.core.api.CacheService] - >> fetching the cache named dnCache >> [17:53:33] INFO [org.apache.directory.server.core.api.CacheService] - >> fetching the cache named alias >> [17:53:33] INFO [org.apache.directory.server.core.api.CacheService] - >> fetching the cache named piar >> [17:53:33] INFO [org.apache.directory.server.core.api.CacheService] - >> fetching the cache named entryDn >> [17:53:38] INFO >> [org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex] - >> Setting CacheRecondManager's cache size to 100 >> [17:53:38] INFO >> [org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex] - >> Setting CacheRecondManager's cache size to 100 >> [17:53:38] INFO >> [org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex] - >> Setting CacheRecondManager's cache size to 100 >> [17:53:38] INFO >> [org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex] - >> Setting CacheRecondManager's cache size to 100 >> [17:53:38] INFO >> [org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex] - >> Setting CacheRecondManager's cache size to 100 >> [17:53:38] INFO >> [org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex] - >> Setting CacheRecondManager's cache size to 100 >> [17:53:38] INFO [org.apache.directory.server.core.api.CacheService] - >> fetching the cache named alias >> [17:53:38] INFO [org.apache.directory.server.core.api.CacheService] - >> fetching the cache named piar >> [17:53:38] INFO [org.apache.directory.server.core.api.CacheService] - >> fetching the cache named entryDn >> [17:53:38] INFO >> [org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition] >> - Setting CacheRecondManager's cache size to 100 >> [17:53:38] INFO [org.apache.directory.server.core.api.CacheService] - >> fetching the cache named system >> [17:53:38] INFO [org.apache.directory.server.core.api.CacheService] - No >> cache with name system exists, creating one >> [17:53:39] INFO >> [org.apache.directory.server.core.security.TlsKeyGenerator] - Keys and >> self signed certificate successfully generated. >> [17:53:40] INFO [org.apache.directory.server.core.api.CacheService] - >> fetching the cache named groupCache >> [17:53:40] INFO >> [org.apache.directory.server.core.event.EventInterceptor] - Initializing >> ... >> [17:53:40] INFO >> [org.apache.directory.server.core.event.EventInterceptor] - >> Initialization complete. >> [17:53:40] WARN >> [org.apache.directory.server.core.DefaultDirectoryService] - You didn't >> change the admin password of directory service instance 'Starbuck's LDAP >> server'. Please update the admin password as soon as possible to >> prevent a possible security breach. >> [17:53:40] DEBUG [org.apache.directory.server.OPERATION_LOG] - >> >> LookupOperation : FilteringOperationContext for Dn 'uid=admin,ou=system', * >> [17:53:40] DEBUG [org.apache.directory.server.OPERATION_LOG] - << >> LookupOperation successful >> [17:53:40] DEBUG [org.apache.directory.server.OPERATION_LOG] - >> >> LookupOperation : FilteringOperationContext for Dn 'uid=admin,ou=system', * >> [17:53:40] DEBUG [org.apache.directory.server.OPERATION_LOG] - << >> LookupOperation successful >> [17:53:40] INFO [org.apache.directory.server.ldap.LdapServer] - >> Successful bind of an LDAP Service (11389) is completed. >> [17:53:40] INFO [org.apache.directory.server.ldap.LdapServer] - Ldap >> service started. >> [17:53:40] DEBUG [org.apache.directory.server.OPERATION_LOG] - >> >> AddOperation : AddContext for Dn 'dc=starwit,dc=de', added entry: Entry >> dn[n]: dc=starwit,dc=de >> objectClass: top >> objectClass: domain >> dc: starwit >> >> [17:53:41] DEBUG [org.apache.directory.server.OPERATION_LOG] - << >> AddOperation successful >> [17:53:41] DEBUG [org.apache.directory.server.OPERATION_LOG] - >> >> hasEntryOperation : HasEntryContext for Dn 'dc=starwit,dc=de' >> [17:53:41] DEBUG [org.apache.directory.server.OPERATION_LOG] - << >> HasEntryOperation successful >> checking true >> [17:53:41] DEBUG [org.apache.directory.server.OPERATION_LOG] - >> >> AddOperation : AddContext for Dn 'ou=users,dc=starwit,dc=de', added >> entry: Entry >> dn[n]: ou=users,dc=starwit,dc=de >> objectClass: top >> objectClass: organizationalUnit >> ou: users >> >> Exception in thread "main" >> org.apache.directory.api.ldap.model.exception.LdapNoSuchObjectException: >> ERR_251_PARENT_NOT_FOUND Parent dc=starwit,dc=de not found >> at >> >> org.apache.directory.server.core.exception.ExceptionInterceptor.add(ExceptionInterceptor.java:165) >> at >> >> org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:422) >> at >> >> org.apache.directory.server.core.admin.AdministrativePointInterceptor.add(AdministrativePointInterceptor.java:1201) >> at >> >> org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:422) >> at >> >> org.apache.directory.server.core.authz.AciAuthorizationInterceptor.add(AciAuthorizationInterceptor.java:515) >> at >> >> org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:422) >> at >> >> org.apache.directory.server.core.referral.ReferralInterceptor.add(ReferralInterceptor.java:249) >> at >> >> org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:422) >> at >> >> org.apache.directory.server.core.authn.AuthenticationInterceptor.add(AuthenticationInterceptor.java:337) >> at >> >> org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:422) >> at >> >> org.apache.directory.server.core.normalization.NormalizationInterceptor.add(NormalizationInterceptor.java:131) >> at >> >> org.apache.directory.server.core.DefaultOperationManager.add(DefaultOperationManager.java:394) >> at >> >> org.apache.directory.server.core.shared.DefaultCoreSession.add(DefaultCoreSession.java:209) >> at >> >> org.apache.directory.server.core.shared.DefaultCoreSession.add(DefaultCoreSession.java:186) >> at de.starwit.DirectoryRunner.main(DirectoryRunner.java:103) >> >> > >
