directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <>
Subject Re: Disabling schema checking
Date Fri, 30 Oct 2009 13:11:04 GMT
Eirik Bjørsnøs wrote:
> Hi,
> I'm trying to rewrite some JUnit tests running agains an external LDAP
> server to use Apache DS instead.
> The old server has certain schema checks disabled. I'd like to disable
> schema checking in ApacheDS as well since the alternative would
> involve rewriting a lot of code.
> My first approch was to disable the SchemaInterceptor as described in
> this thread:
> However, this seems to break my code that adds custom attributes and
> objectclasses. It fails with a NameNotFoundException ("Cannot find a
> partition for"). So it seems that the SchemaInterceptor
> is responsible for more that just enforcing rules when modifying the
> directory.
Yeah. The Schema Interceptor is probably one of the essential part of 
the server, and removing it is probably like removing the engine in a 
car. It will simply won't work anymore.

> In that thread Alex also mentioned plans for rewriting the
> SchemaInterceptor so that it would be easier to just disable
> enforcement of rules:
We are currently refactoring the whole schema handling, but we won't 
relax the schema checks.

The only way to go if you are using Unit tests is to define a schema 
which fits your need. It's a lot of work, but I see no other way.

What server are your tests based on ?

cordialement, regards,
Emmanuel Lécharny

View raw message