directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Seelmann <>
Subject Re: ExceptionInterceptor and undue lookup
Date Thu, 06 Jan 2011 22:36:21 GMT
On Thu, Jan 6, 2011 at 10:21 PM, Stefan Seelmann <> wrote:
> On Thu, Jan 6, 2011 at 6:35 PM, Emmanuel Lecharny <> wrote:
>> Hi,
>> following my previous mail, I have a bit more insight about the problem.
>> When we do a search, we not only give a base DN, but also a filter and a
>> scope. Now, there are a few possibilities :
>> 1) We have entries under the base DN, accepted by the filter and the scope
>> 2) We have entries under the base DN, but the filter and the scope discard
>> all of them, thus returning no entries
>> 3) The base DN is not a DN in the DIT, the filter and scope are not even
>> used, thus generating a NO_SUCH_OBJECT result.
>> The ExceptionInterceptor extra lookup is just checking the third case. We
>> can't handle this case in the SearchHandler, because the candidate have
>> potentially been ruled out by the filter and the scope, and we can't anymore
>> make a distinction between case #2 and case #3.
> Can't that be handled at other places?
> The DefaultPartitionNexus.getPartition(DN) seems to handle the case
> that no partition for the base DN exists and throws an
> LdapNoSuchObjectException. (example: base DN is
> ou=people,dc=example,dc=com but not partiton for dc=example,dc=com
> exists)
> In the other case, when an partition exists then the problem is in
> DefaultSearchEngine.cursor() method. This method returns an
> EmptyIndexCursor if the base doesn't exist, IMO that should throw the
> exception.

I created a Jira and attached a patch:

Kind Regards,

View raw message