directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob van Maris <>
Subject Problems embedding Apache DS
Date Wed, 12 Aug 2009 10:23:16 GMT
Hi developers,
I want to embed the ApacheDS LDAP server in a small app, for use in
small integration tests. I followed the codesample "Embedding ApacheDS
as a Web Application" at

Based on this, here's my code for starting the LDAP server embedded:

    private DirectoryService directoryService;
    private LdapService ldapService;

    // Start directory service.
    directoryService = new DefaultDirectoryService();

    // Start server.
    ldapService = new LdapService();
    ldapService.setSocketAcceptor(new SocketAcceptor(null));

This seemed to work for a while, but unfortunately exceptions start to
occur when multiple threads are connection and trying to create and
lookup different entries at the same time. The error I get is LDAP
error code 54 (LDAP_LOOP_DETECT).

Since the problem does not occur under similar conditions on a
standalone ApacheDS LDAP server, I suspect there's something missing
in my code for initializing and starting the server embedded.

Do you have any idea what's missing? Otherwise, could you point me to
other resources that explain how to embed the LDAP server?

Rob van Maris

View raw message