Check out the following test case which enables the NIS schema via the ou=schema partition just by changing the enabled attribute of the schema object:

http://svn.apache.org/repos/asf/directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java

You can do the same for the Krb5kdc schema.

Alex

On 3/11/07, Enrique Rodriguez <enriquer9@gmail.com> wrote:
I'm trying to write integration tests for the SASL GSSAPI mechanism,
which means adding a user with Kerberos principal attributes.
However, I can't add a Kerberos principal, without the following
error:

javax.naming.directory.InvalidAttributeIdentifierException: [LDAP:
error code 17 - failed to add entry
uid=hnelson,ou=users,dc=example,dc=com: krb5principalname not found in
attribute registry!:

Can someone point me to another ITest or Test anywhere that shows how
to add or enable a schema?  Shouldn't the Kerberos schema be enabled
by default?

Enrique