You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Stefan Zoerner (JIRA)" <ji...@apache.org> on 2006/08/19 12:40:13 UTC

[jira] Created: (DIRSERVER-709) Special case, in which removal of objectClass attribute does not cause an error

Special case, in which removal of objectClass attribute does not cause an error
-------------------------------------------------------------------------------

                 Key: DIRSERVER-709
                 URL: http://issues.apache.org/jira/browse/DIRSERVER-709
             Project: Directory ApacheDS
          Issue Type: Bug
    Affects Versions: 1.0-RC4
         Environment: * ApacheDS 1.0 RC4 SNAPSHOT
* Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
* Windows XP Professional SP2
            Reporter: Stefan Zoerner
            Priority: Minor


In a special case, removal of the objectClass attribute in a certain way does not cause an error (no exception occurs). The entry is unchanged (which is correct), thus this is only a minor problem from my point of view. Here it is:

If one creates an entry like this:

dn: cn=Kate Bush,dc=example,dc=com
objectclass: top
objectclass: person
objectclass: organizationalperson
objectclass: inetorgperson
sn: Bush
cn: Kate Bush

and performs the following modify operation with JNDI

ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute("objectclass", ""));
ctx.modifyAttributes("cn=Kate Bush", new ModificationItem[] { delModOp });

the method call of modifyAttributes does not throw an exception. The expected retuirn code is 69 (OBJECT_CLASS_MODS_PROHIBITED). Note that the correct return code is provided by the server, if I perform this Java code:

ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute("objectclass"));
ctx.modifyAttributes("cn=Kate Bush", new ModificationItem[] { delModOp });

or if the entry looks like this:

dn: cn=Kate Bush,dc=example,dc=com
objectclass: top
objectclass: person
sn: Bush
cn: Kate Bush

I was able to create JUnit test cases both with JNDI and Nescape SDK for Java and will attach both of them later.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (DIRSERVER-709) Special case, in which removal of objectClass attribute does not cause an error

Posted by "Stefan Zoerner (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRSERVER-709?page=all ]

Stefan Zoerner closed DIRSERVER-709.
------------------------------------


I have retested this one with the current build of the Apache DS 1.0 branch. It works perfect, hence I close the issue. Thanks Ersin!  

> Special case, in which removal of objectClass attribute does not cause an error
> -------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-709
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-709
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.0-RC4
>         Environment: * ApacheDS 1.0 RC4 SNAPSHOT
> * Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
> * Windows XP Professional SP2
>            Reporter: Stefan Zoerner
>         Assigned To: Ersin Er
>            Priority: Minor
>         Attachments: DeleteObjectClassAttributeJndiTest.java, DeleteObjectClassAttributeNetscapeTest.java
>
>
> In a special case, removal of the objectClass attribute in a certain way does not cause an error (no exception occurs). The entry is unchanged (which is correct), thus this is only a minor problem from my point of view. Here it is:
> If one creates an entry like this:
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> objectclass: organizationalperson
> objectclass: inetorgperson
> sn: Bush
> cn: Kate Bush
> and performs the following modify operation with JNDI
> ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute("objectclass", ""));
> ctx.modifyAttributes("cn=Kate Bush", new ModificationItem[] { delModOp });
> the method call of modifyAttributes does not throw an exception. The expected retuirn code is 69 (OBJECT_CLASS_MODS_PROHIBITED). Note that the correct return code is provided by the server, if I perform this Java code:
> ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute("objectclass"));
> ctx.modifyAttributes("cn=Kate Bush", new ModificationItem[] { delModOp });
> or if the entry looks like this:
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> sn: Bush
> cn: Kate Bush
> I was able to create JUnit test cases both with JNDI and Nescape SDK for Java and will attach both of them later.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (DIRSERVER-709) Special case, in which removal of objectClass attribute does not cause an error

Posted by "Ersin Er (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRSERVER-709?page=all ]

Ersin Er reassigned DIRSERVER-709:
----------------------------------

    Assignee: Ersin Er  (was: Alex Karasulu)

> Special case, in which removal of objectClass attribute does not cause an error
> -------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-709
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-709
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.0-RC4
>         Environment: * ApacheDS 1.0 RC4 SNAPSHOT
> * Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
> * Windows XP Professional SP2
>            Reporter: Stefan Zoerner
>         Assigned To: Ersin Er
>            Priority: Minor
>         Attachments: DeleteObjectClassAttributeJndiTest.java, DeleteObjectClassAttributeNetscapeTest.java
>
>
> In a special case, removal of the objectClass attribute in a certain way does not cause an error (no exception occurs). The entry is unchanged (which is correct), thus this is only a minor problem from my point of view. Here it is:
> If one creates an entry like this:
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> objectclass: organizationalperson
> objectclass: inetorgperson
> sn: Bush
> cn: Kate Bush
> and performs the following modify operation with JNDI
> ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute("objectclass", ""));
> ctx.modifyAttributes("cn=Kate Bush", new ModificationItem[] { delModOp });
> the method call of modifyAttributes does not throw an exception. The expected retuirn code is 69 (OBJECT_CLASS_MODS_PROHIBITED). Note that the correct return code is provided by the server, if I perform this Java code:
> ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute("objectclass"));
> ctx.modifyAttributes("cn=Kate Bush", new ModificationItem[] { delModOp });
> or if the entry looks like this:
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> sn: Bush
> cn: Kate Bush
> I was able to create JUnit test cases both with JNDI and Nescape SDK for Java and will attach both of them later.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DIRSERVER-709) Special case, in which removal of objectClass attribute does not cause an error

Posted by "Ersin Er (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRSERVER-709?page=comments#action_12429563 ] 
            
Ersin Er commented on DIRSERVER-709:
------------------------------------

Fixed here http://svn.apache.org/viewvc?rev=433408&view=rev and here http://svn.apache.org/viewvc?rev=433415&view=rev

The problem was due to JNDI as it accepts "" as a valid value during a attribute remove operation. Now we do skip "" values in change sets of remove operations.

> Special case, in which removal of objectClass attribute does not cause an error
> -------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-709
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-709
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.0-RC4
>         Environment: * ApacheDS 1.0 RC4 SNAPSHOT
> * Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
> * Windows XP Professional SP2
>            Reporter: Stefan Zoerner
>         Assigned To: Ersin Er
>            Priority: Minor
>         Attachments: DeleteObjectClassAttributeJndiTest.java, DeleteObjectClassAttributeNetscapeTest.java
>
>
> In a special case, removal of the objectClass attribute in a certain way does not cause an error (no exception occurs). The entry is unchanged (which is correct), thus this is only a minor problem from my point of view. Here it is:
> If one creates an entry like this:
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> objectclass: organizationalperson
> objectclass: inetorgperson
> sn: Bush
> cn: Kate Bush
> and performs the following modify operation with JNDI
> ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute("objectclass", ""));
> ctx.modifyAttributes("cn=Kate Bush", new ModificationItem[] { delModOp });
> the method call of modifyAttributes does not throw an exception. The expected retuirn code is 69 (OBJECT_CLASS_MODS_PROHIBITED). Note that the correct return code is provided by the server, if I perform this Java code:
> ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute("objectclass"));
> ctx.modifyAttributes("cn=Kate Bush", new ModificationItem[] { delModOp });
> or if the entry looks like this:
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> sn: Bush
> cn: Kate Bush
> I was able to create JUnit test cases both with JNDI and Nescape SDK for Java and will attach both of them later.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (DIRSERVER-709) Special case, in which removal of objectClass attribute does not cause an error

Posted by "Alex Karasulu (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRSERVER-709?page=all ]

Alex Karasulu reassigned DIRSERVER-709:
---------------------------------------

    Assignee: Alex Karasulu

> Special case, in which removal of objectClass attribute does not cause an error
> -------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-709
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-709
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.0-RC4
>         Environment: * ApacheDS 1.0 RC4 SNAPSHOT
> * Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
> * Windows XP Professional SP2
>            Reporter: Stefan Zoerner
>         Assigned To: Alex Karasulu
>            Priority: Minor
>         Attachments: DeleteObjectClassAttributeJndiTest.java, DeleteObjectClassAttributeNetscapeTest.java
>
>
> In a special case, removal of the objectClass attribute in a certain way does not cause an error (no exception occurs). The entry is unchanged (which is correct), thus this is only a minor problem from my point of view. Here it is:
> If one creates an entry like this:
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> objectclass: organizationalperson
> objectclass: inetorgperson
> sn: Bush
> cn: Kate Bush
> and performs the following modify operation with JNDI
> ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute("objectclass", ""));
> ctx.modifyAttributes("cn=Kate Bush", new ModificationItem[] { delModOp });
> the method call of modifyAttributes does not throw an exception. The expected retuirn code is 69 (OBJECT_CLASS_MODS_PROHIBITED). Note that the correct return code is provided by the server, if I perform this Java code:
> ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute("objectclass"));
> ctx.modifyAttributes("cn=Kate Bush", new ModificationItem[] { delModOp });
> or if the entry looks like this:
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> sn: Bush
> cn: Kate Bush
> I was able to create JUnit test cases both with JNDI and Nescape SDK for Java and will attach both of them later.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (DIRSERVER-709) Special case, in which removal of objectClass attribute does not cause an error

Posted by "Ersin Er (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRSERVER-709?page=all ]

Ersin Er resolved DIRSERVER-709.
--------------------------------

    Resolution: Fixed

> Special case, in which removal of objectClass attribute does not cause an error
> -------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-709
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-709
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.0-RC4
>         Environment: * ApacheDS 1.0 RC4 SNAPSHOT
> * Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
> * Windows XP Professional SP2
>            Reporter: Stefan Zoerner
>         Assigned To: Ersin Er
>            Priority: Minor
>         Attachments: DeleteObjectClassAttributeJndiTest.java, DeleteObjectClassAttributeNetscapeTest.java
>
>
> In a special case, removal of the objectClass attribute in a certain way does not cause an error (no exception occurs). The entry is unchanged (which is correct), thus this is only a minor problem from my point of view. Here it is:
> If one creates an entry like this:
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> objectclass: organizationalperson
> objectclass: inetorgperson
> sn: Bush
> cn: Kate Bush
> and performs the following modify operation with JNDI
> ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute("objectclass", ""));
> ctx.modifyAttributes("cn=Kate Bush", new ModificationItem[] { delModOp });
> the method call of modifyAttributes does not throw an exception. The expected retuirn code is 69 (OBJECT_CLASS_MODS_PROHIBITED). Note that the correct return code is provided by the server, if I perform this Java code:
> ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute("objectclass"));
> ctx.modifyAttributes("cn=Kate Bush", new ModificationItem[] { delModOp });
> or if the entry looks like this:
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> sn: Bush
> cn: Kate Bush
> I was able to create JUnit test cases both with JNDI and Nescape SDK for Java and will attach both of them later.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DIRSERVER-709) Special case, in which removal of objectClass attribute does not cause an error

Posted by "Stefan Zoerner (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRSERVER-709?page=all ]

Stefan Zoerner updated DIRSERVER-709:
-------------------------------------

    Attachment: DeleteObjectClassAttributeNetscapeTest.java

Testcase to demonstrate DIRSERVER-709 ("Special case, in which removal of objectClass attribute does not cause an error.") with Netscape SDK for Java. It has been checked with Sun Java System Directory Server 5.2, OpenLDAP 2.3 and IBM Tivoli Directory Server 6.0. All tests pass, but I had to allow different error codes for the problematic situation, because the servers handle it differently. 

With ApacheDS 1.0 RC4, the method testDeleteOclAttrWithTopPersonOrganizationalpersonInetorgperson fails, because no error occurs at all.  

> Special case, in which removal of objectClass attribute does not cause an error
> -------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-709
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-709
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.0-RC4
>         Environment: * ApacheDS 1.0 RC4 SNAPSHOT
> * Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
> * Windows XP Professional SP2
>            Reporter: Stefan Zoerner
>            Priority: Minor
>         Attachments: DeleteObjectClassAttributeNetscapeTest.java
>
>
> In a special case, removal of the objectClass attribute in a certain way does not cause an error (no exception occurs). The entry is unchanged (which is correct), thus this is only a minor problem from my point of view. Here it is:
> If one creates an entry like this:
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> objectclass: organizationalperson
> objectclass: inetorgperson
> sn: Bush
> cn: Kate Bush
> and performs the following modify operation with JNDI
> ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute("objectclass", ""));
> ctx.modifyAttributes("cn=Kate Bush", new ModificationItem[] { delModOp });
> the method call of modifyAttributes does not throw an exception. The expected retuirn code is 69 (OBJECT_CLASS_MODS_PROHIBITED). Note that the correct return code is provided by the server, if I perform this Java code:
> ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute("objectclass"));
> ctx.modifyAttributes("cn=Kate Bush", new ModificationItem[] { delModOp });
> or if the entry looks like this:
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> sn: Bush
> cn: Kate Bush
> I was able to create JUnit test cases both with JNDI and Nescape SDK for Java and will attach both of them later.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DIRSERVER-709) Special case, in which removal of objectClass attribute does not cause an error

Posted by "Stefan Zoerner (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRSERVER-709?page=all ]

Stefan Zoerner updated DIRSERVER-709:
-------------------------------------

    Attachment: DeleteObjectClassAttributeJndiTest.java

Testcase to demonstrate DIRSERVER-709 ("Special case, in which removal of objectClass attribute does not cause an error.") with JNDI. It has been checked with Sun Java System Directory Server 5.2, OpenLDAP 2.3 and IBM Tivoli Directory Server 6.0. All tests pass, but I had to allow different exceptions for the problematic situation, because the servers handle it differently.

With ApacheDS 1.0 RC4, the method testDeleteOclAttrWithTopPersonOrganizationalpersonInetorgperson fails, because no error occurs at all.

> Special case, in which removal of objectClass attribute does not cause an error
> -------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-709
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-709
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.0-RC4
>         Environment: * ApacheDS 1.0 RC4 SNAPSHOT
> * Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
> * Windows XP Professional SP2
>            Reporter: Stefan Zoerner
>            Priority: Minor
>         Attachments: DeleteObjectClassAttributeJndiTest.java, DeleteObjectClassAttributeNetscapeTest.java
>
>
> In a special case, removal of the objectClass attribute in a certain way does not cause an error (no exception occurs). The entry is unchanged (which is correct), thus this is only a minor problem from my point of view. Here it is:
> If one creates an entry like this:
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> objectclass: organizationalperson
> objectclass: inetorgperson
> sn: Bush
> cn: Kate Bush
> and performs the following modify operation with JNDI
> ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute("objectclass", ""));
> ctx.modifyAttributes("cn=Kate Bush", new ModificationItem[] { delModOp });
> the method call of modifyAttributes does not throw an exception. The expected retuirn code is 69 (OBJECT_CLASS_MODS_PROHIBITED). Note that the correct return code is provided by the server, if I perform this Java code:
> ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute("objectclass"));
> ctx.modifyAttributes("cn=Kate Bush", new ModificationItem[] { delModOp });
> or if the entry looks like this:
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> sn: Bush
> cn: Kate Bush
> I was able to create JUnit test cases both with JNDI and Nescape SDK for Java and will attach both of them later.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira