directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Norval Hope (JIRA)" <j...@apache.org>
Subject [jira] Created: (DIRSERVER-1292) Enabling NIS schema causes core-integ unit test to NPE
Date Fri, 28 Nov 2008 11:51:44 GMT
Enabling NIS schema causes core-integ unit test to NPE
------------------------------------------------------

                 Key: DIRSERVER-1292
                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1292
             Project: Directory ApacheDS
          Issue Type: Bug
          Components: core-integ
            Reporter: Norval Hope
             Fix For: 1.5.5


[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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message