directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cimballi" <cimba...@cimballi.net>
Subject [apacheds] How to get the whole entries?
Date Thu, 21 Jul 2005 09:22:44 GMT
I don't know about ApacheDS but when you ask the server for the empty DN, it
should return you the RootDSE.
In the RootDSE, there is an attribute (called something like managedContexts)
which hold the DNs of the root entries of the directory (there can be multiple
root entries). Then you can make a search on these entries with subtree scope
to get all subentries.

Cimballi


On 7/21/05, Trustin Lee <trustin@gmail.com> wrote:
> Hi all,
>
>  I'm trying to get the list of the whole entries in DIT like this:
>
>          SearchControls ctrl = new SearchControls();
>          ctrl.setSearchScope( SearchControls.SUBTREE_SCOPE );
>          NamingEnumeration e =
> ctx.getFactoryConfiguration().getPartitionNexus().search(
>                  new LdapName( "" ),
>                  ctx.getFactoryConfiguration().getEnvironment(),
>                  new PresenceNode( "objectClass" ), ctrl );
>
> But this fails because ApacheDS cannot find an entry without a name:
>
>  SEVERE: Unexpected exception.
>  org.apache.ldap.common.exception.LdapNameNotFoundException
>          at
> org.apache.ldap.server.partition.DefaultContextPartitionNexus.search(DefaultContextPartitionNexus.java:574)
>
>  Any ideas?
>
>  Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/



Mime
View raw message