You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Ole Ersoy (JIRA)" <ji...@apache.org> on 2007/06/11 12:30:26 UTC

[jira] Created: (DIRSERVER-966) NPE When ObjectClass Attribute Missing

NPE When ObjectClass Attribute Missing
--------------------------------------

                 Key: DIRSERVER-966
                 URL: https://issues.apache.org/jira/browse/DIRSERVER-966
             Project: Directory ApacheDS
          Issue Type: Bug
            Reporter: Ole Ersoy


In the code below the attribute is not added to the attributes.  When attempting to create a subcontext, this results in an NPE.

 ========================================
         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);
 ========================================

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] 

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


[jira] Updated: (DIRSERVER-966) NPE When ObjectClass Attribute Missing

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny updated DIRSERVER-966:
----------------------------------------

    Affects Version/s: 1.0.3
        Fix Version/s: 1.0.4

Added the affected version.

> NPE When ObjectClass Attribute Missing
> --------------------------------------
>
>                 Key: DIRSERVER-966
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-966
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.0.3
>            Reporter: Ole Ersoy
>            Assignee: Emmanuel Lecharny
>             Fix For: 1.0.4
>
>
> In the code below the attribute is not added to the attributes.  When attempting to create a subcontext, this results in an NPE.
>  ========================================
>          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);
>  ========================================
> 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] 

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


[jira] Closed: (DIRSERVER-966) NPE When ObjectClass Attribute Missing

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny closed DIRSERVER-966.
---------------------------------------


> NPE When ObjectClass Attribute Missing
> --------------------------------------
>
>                 Key: DIRSERVER-966
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-966
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.0.3
>            Reporter: Ole Ersoy
>            Assignee: Emmanuel Lecharny
>             Fix For: 1.0.4
>
>
> In the code below the attribute is not added to the attributes.  When attempting to create a subcontext, this results in an NPE.
>  ========================================
>          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);
>  ========================================
> 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] 

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


[jira] Assigned: (DIRSERVER-966) NPE When ObjectClass Attribute Missing

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny reassigned DIRSERVER-966:
-------------------------------------------

    Assignee: Emmanuel Lecharny

> NPE When ObjectClass Attribute Missing
> --------------------------------------
>
>                 Key: DIRSERVER-966
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-966
>             Project: Directory ApacheDS
>          Issue Type: Bug
>            Reporter: Ole Ersoy
>            Assignee: Emmanuel Lecharny
>
> In the code below the attribute is not added to the attributes.  When attempting to create a subcontext, this results in an NPE.
>  ========================================
>          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);
>  ========================================
> 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] 

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


[jira] Commented: (DIRSERVER-966) NPE When ObjectClass Attribute Missing

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12503368 ] 

Emmanuel Lecharny commented on DIRSERVER-966:
---------------------------------------------

Fixed in 1.5 :
http://svn.apache.org/viewvc?view=rev&rev=546021

The code wasn't protected against a submission of an Attributes without any Attribute.

Must be fixed also in 1.0

Thanks Ole, good catch !

> NPE When ObjectClass Attribute Missing
> --------------------------------------
>
>                 Key: DIRSERVER-966
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-966
>             Project: Directory ApacheDS
>          Issue Type: Bug
>            Reporter: Ole Ersoy
>            Assignee: Emmanuel Lecharny
>
> In the code below the attribute is not added to the attributes.  When attempting to create a subcontext, this results in an NPE.
>  ========================================
>          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);
>  ========================================
> 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] 

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


[jira] Resolved: (DIRSERVER-966) NPE When ObjectClass Attribute Missing

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny resolved DIRSERVER-966.
-----------------------------------------

    Resolution: Fixed

Fixed in 1.0 too :
http://svn.apache.org/viewvc?view=rev&rev=546115

Some more fix in 1.5 :
http://svn.apache.org/viewvc?view=rev&rev=546119

While fixed the code, I found another nasty error in the modify operation... we created the 'objectClasses' attribute instead of the 'objectClass'.

> NPE When ObjectClass Attribute Missing
> --------------------------------------
>
>                 Key: DIRSERVER-966
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-966
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.0.3
>            Reporter: Ole Ersoy
>            Assignee: Emmanuel Lecharny
>             Fix For: 1.0.4
>
>
> In the code below the attribute is not added to the attributes.  When attempting to create a subcontext, this results in an NPE.
>  ========================================
>          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);
>  ========================================
> 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] 

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