Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
[From dev list between Norval Hope and Emmanuel Lecharny, 28/11/2008]
I attempted to activate the nis.schema by commenting out nis in
apacheds\bootstrap-partition\pom.xml as follows:
<plugin>
<groupId>org.apache.directory.server</groupId>
<artifactId>apacheds-bootstrap-plugin</artifactId>
<configuration>
<disabledSchemas>
<!-<disabledSchema>nis</disabledSchema>-> !!!!!!!!!!
<disabledSchema>krb5kdc</disabledSchema>
<snip/>
however after doing that "mvn install" fails as follows:
<snip/>
Running org.apache.directory.server.core.suites.SchemaISuite
javax.naming.NamingException [Root exception is java.lang.NullPointerException]
at org.apache.directory.server.core.jndi.JndiUtils.wrap(JndiUtils.java:40)
at org.apache.directory.server.core.jndi.ServerDirContext.modifyAttributes(ServerDirContext.java:260)
at org.apache.directory.server.core.jndi.ServerDirContext.modifyAttributes(ServerDirContext.java:242)
at org.apache.directory.server.core.schema.SchemaPersistenceIT.enableSchema(SchemaPersistenceIT.java:149)
at org.apache.directory.server.core.schema.SchemaPersistenceIT.testAddAttributeTypePersistence(SchemaPersistenceIT.java:81)
This is a side effect : when you remove the <disable nis> line in the apacheds-bootstrap pom.xml file, this schema is enabled. Now the tests start with :
public void testAddAttributeTypePersistence() throws Exception
{
try
{
enableSchema( "nis" );
which won't work, of course.
But I must admit that this NPE is obviously a mistake. We should simply return from this method silently if the schema is already enabled.