directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@apache.org>
Subject Re: [jira] Updated: (DIRSERVER-964) Binding does not return DirContext Object's when creating by doing ctx.createSubcontext("cn=test");
Date Mon, 11 Jun 2007 04:16:15 GMT
Ole Ersoy a écrit :

> Hmmm.  I updated my test with this:
>
> ========================================
>         Attributes attributes                    =
>             new BasicAttributes();
>         Attribute attribute                        =
>             new BasicAttribute(
>                     "objectClass",
>                     "top");
>         attribute.add("subentry");
>        
>         directoryContextL0                       =
>              (DirContext)
>              testPartitionContext.
>              createSubcontext(l0RDN, attributes);
>
>         directoryContextL1                       =
>              (DirContext)
>              directoryContextL0.
>              createSubcontext(l1RDN, attributes);
> ========================================
>
> I think the subentry ObjectClass is part of the RFC that allows this 
> ctx.createSubcontext("cn=test")....When I try running the test above I 
> get this:
>
> org.apache.directory.server.core.interceptor.InterceptorException: 
> Unexpected exception. [Root exception is java.lang.NullPointerException]


Plain normal. Unless you put the attribute into the attributes, you will 
get this NPE :
attributes.put( attribute );

Now, what is *not* plain normal, is that the server returns a NPE !!!

Can you fill a JIRA for this nasty NPE ?

Thanks !


Mime
View raw message