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/06/12 22:15:29 UTC

[jira] Created: (DIRSERVER-643) Netscape SDK: Adding an entry with two description attributes does not combine values.

Netscape SDK: Adding an entry with two description attributes does not combine values.
--------------------------------------------------------------------------------------

         Key: DIRSERVER-643
         URL: http://issues.apache.org/jira/browse/DIRSERVER-643
     Project: Directory ApacheDS
        Type: Bug

    Versions: 1.0-RC3    
 Environment: ApacheDS 1.0 RC 3
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Microsoft Windows XP version 5.1 Service Pack 1
    Reporter: Stefan Zoerner


Here is a strange behavior, which I am only able to demonstrate with Netscape LDAP SDK for Java (or compatible APIs like Sun or Mozilla). I create an LDAPEntry with two separate LDAPAttribute objects for two description values in the LDAPAttributeSet. 

...
LDAPAttributeSet attrs = new LDAPAttributeSet();
LDAPAttribute ocls = new LDAPAttribute("objectclass", new String[] { "top", "person" });
attrs.add(ocls);
attrs.add(new LDAPAttribute("sn", "Bush"));
attrs.add(new LDAPAttribute("cn", "Kate Bush"));
        
String descr[] = {
   "a British singer-songwriter with an expressive four-octave voice",
   "one of the most influential female artists of the twentieth century" };
        
attrs.add(new LDAPAttribute("description", descr[0]));
attrs.add(new LDAPAttribute("description", descr[1]));
...

After creation, the outcome is an entry within ApacheDS with only one of the description values: 

dn: cn=Kate Bush,dc=example,dc=com
objectclass: top
objectclass: person
cn: Kate Bush
sn: Bush
description: one of the most influential female artists of the twentieth century

I attach the complete code as a JUnit test case. The code (and the test case) works with other LDAP servers (Sun Java System Directory Server 5.2 for instance) as expected (entry with two description values).

I was not able to create a comparable problem with an add operation with JNDI. I assume that the corresponding BasicAttributes class within JNDI and its LDAP provider combines/consolidates the attributes on its own, which results in one attribute with two values.

-- 
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-643) Netscape SDK: Adding an entry with two description attributes does not combine values.

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

Stefan Zoerner updated DIRSERVER-643:
-------------------------------------

    Attachment: AddDupplicateAttributeTest.java

Testcase to demonstrate this issue.

> Netscape SDK: Adding an entry with two description attributes does not combine values.
> --------------------------------------------------------------------------------------
>
>          Key: DIRSERVER-643
>          URL: http://issues.apache.org/jira/browse/DIRSERVER-643
>      Project: Directory ApacheDS
>         Type: Bug

>     Versions: 1.0-RC3
>  Environment: ApacheDS 1.0 RC 3
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
> Microsoft Windows XP version 5.1 Service Pack 1
>     Reporter: Stefan Zoerner
>  Attachments: AddDupplicateAttributeTest.java
>
> Here is a strange behavior, which I am only able to demonstrate with Netscape LDAP SDK for Java (or compatible APIs like Sun or Mozilla). I create an LDAPEntry with two separate LDAPAttribute objects for two description values in the LDAPAttributeSet. 
> ...
> LDAPAttributeSet attrs = new LDAPAttributeSet();
> LDAPAttribute ocls = new LDAPAttribute("objectclass", new String[] { "top", "person" });
> attrs.add(ocls);
> attrs.add(new LDAPAttribute("sn", "Bush"));
> attrs.add(new LDAPAttribute("cn", "Kate Bush"));
>         
> String descr[] = {
>    "a British singer-songwriter with an expressive four-octave voice",
>    "one of the most influential female artists of the twentieth century" };
>         
> attrs.add(new LDAPAttribute("description", descr[0]));
> attrs.add(new LDAPAttribute("description", descr[1]));
> ...
> After creation, the outcome is an entry within ApacheDS with only one of the description values: 
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> cn: Kate Bush
> sn: Bush
> description: one of the most influential female artists of the twentieth century
> I attach the complete code as a JUnit test case. The code (and the test case) works with other LDAP servers (Sun Java System Directory Server 5.2 for instance) as expected (entry with two description values).
> I was not able to create a comparable problem with an add operation with JNDI. I assume that the corresponding BasicAttributes class within JNDI and its LDAP provider combines/consolidates the attributes on its own, which results in one attribute with two values.

-- 
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-643) Netscape SDK: Adding an entry with two description attributes does not combine values.

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

Alex Karasulu reassigned DIRSERVER-643:
---------------------------------------

    Assignee: Alex Karasulu  (was: Emmanuel Lecharny)

> Netscape SDK: Adding an entry with two description attributes does not combine values.
> --------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-643
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-643
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.0-RC3
>         Environment: ApacheDS 1.0 RC 3
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
> Microsoft Windows XP version 5.1 Service Pack 1
>            Reporter: Stefan Zoerner
>         Assigned To: Alex Karasulu
>            Priority: Minor
>         Attachments: AddDupplicateAttributeTest.java
>
>
> Here is a strange behavior, which I am only able to demonstrate with Netscape LDAP SDK for Java (or compatible APIs like Sun or Mozilla). I create an LDAPEntry with two separate LDAPAttribute objects for two description values in the LDAPAttributeSet. 
> ...
> LDAPAttributeSet attrs = new LDAPAttributeSet();
> LDAPAttribute ocls = new LDAPAttribute("objectclass", new String[] { "top", "person" });
> attrs.add(ocls);
> attrs.add(new LDAPAttribute("sn", "Bush"));
> attrs.add(new LDAPAttribute("cn", "Kate Bush"));
>         
> String descr[] = {
>    "a British singer-songwriter with an expressive four-octave voice",
>    "one of the most influential female artists of the twentieth century" };
>         
> attrs.add(new LDAPAttribute("description", descr[0]));
> attrs.add(new LDAPAttribute("description", descr[1]));
> ...
> After creation, the outcome is an entry within ApacheDS with only one of the description values: 
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> cn: Kate Bush
> sn: Bush
> description: one of the most influential female artists of the twentieth century
> I attach the complete code as a JUnit test case. The code (and the test case) works with other LDAP servers (Sun Java System Directory Server 5.2 for instance) as expected (entry with two description values).
> I was not able to create a comparable problem with an add operation with JNDI. I assume that the corresponding BasicAttributes class within JNDI and its LDAP provider combines/consolidates the attributes on its own, which results in one attribute with two values.

-- 
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-643) Netscape SDK: Adding an entry with two description attributes does not combine values.

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRSERVER-643?page=comments#action_12426458 ] 
            
Emmanuel Lecharny commented on DIRSERVER-643:
---------------------------------------------

I have created a test case for it (sorry to have forgotten to point to a svn revision or to the test name) and I think it proove that it was a netscape bug. I may be totally wrong however.

We may have to check with the Netscape API...

> Netscape SDK: Adding an entry with two description attributes does not combine values.
> --------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-643
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-643
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.0-RC3
>         Environment: ApacheDS 1.0 RC 3
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
> Microsoft Windows XP version 5.1 Service Pack 1
>            Reporter: Stefan Zoerner
>         Assigned To: Alex Karasulu
>            Priority: Minor
>             Fix For: 1.1.0, 1.0-RC4
>
>         Attachments: AddDupplicateAttributeTest.java
>
>
> Here is a strange behavior, which I am only able to demonstrate with Netscape LDAP SDK for Java (or compatible APIs like Sun or Mozilla). I create an LDAPEntry with two separate LDAPAttribute objects for two description values in the LDAPAttributeSet. 
> ...
> LDAPAttributeSet attrs = new LDAPAttributeSet();
> LDAPAttribute ocls = new LDAPAttribute("objectclass", new String[] { "top", "person" });
> attrs.add(ocls);
> attrs.add(new LDAPAttribute("sn", "Bush"));
> attrs.add(new LDAPAttribute("cn", "Kate Bush"));
>         
> String descr[] = {
>    "a British singer-songwriter with an expressive four-octave voice",
>    "one of the most influential female artists of the twentieth century" };
>         
> attrs.add(new LDAPAttribute("description", descr[0]));
> attrs.add(new LDAPAttribute("description", descr[1]));
> ...
> After creation, the outcome is an entry within ApacheDS with only one of the description values: 
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> cn: Kate Bush
> sn: Bush
> description: one of the most influential female artists of the twentieth century
> I attach the complete code as a JUnit test case. The code (and the test case) works with other LDAP servers (Sun Java System Directory Server 5.2 for instance) as expected (entry with two description values).
> I was not able to create a comparable problem with an add operation with JNDI. I assume that the corresponding BasicAttributes class within JNDI and its LDAP provider combines/consolidates the attributes on its own, which results in one attribute with two values.

-- 
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-643) Netscape SDK: Adding an entry with two description attributes does not combine values.

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

Alex Karasulu closed DIRSERVER-643.
-----------------------------------

    Fix Version/s: 1.1.0
                   1.0-RC4
       Resolution: Fixed

Fixed on revisions: 429156-429159.

> Netscape SDK: Adding an entry with two description attributes does not combine values.
> --------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-643
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-643
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.0-RC3
>         Environment: ApacheDS 1.0 RC 3
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
> Microsoft Windows XP version 5.1 Service Pack 1
>            Reporter: Stefan Zoerner
>         Assigned To: Alex Karasulu
>            Priority: Minor
>             Fix For: 1.1.0, 1.0-RC4
>
>         Attachments: AddDupplicateAttributeTest.java
>
>
> Here is a strange behavior, which I am only able to demonstrate with Netscape LDAP SDK for Java (or compatible APIs like Sun or Mozilla). I create an LDAPEntry with two separate LDAPAttribute objects for two description values in the LDAPAttributeSet. 
> ...
> LDAPAttributeSet attrs = new LDAPAttributeSet();
> LDAPAttribute ocls = new LDAPAttribute("objectclass", new String[] { "top", "person" });
> attrs.add(ocls);
> attrs.add(new LDAPAttribute("sn", "Bush"));
> attrs.add(new LDAPAttribute("cn", "Kate Bush"));
>         
> String descr[] = {
>    "a British singer-songwriter with an expressive four-octave voice",
>    "one of the most influential female artists of the twentieth century" };
>         
> attrs.add(new LDAPAttribute("description", descr[0]));
> attrs.add(new LDAPAttribute("description", descr[1]));
> ...
> After creation, the outcome is an entry within ApacheDS with only one of the description values: 
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> cn: Kate Bush
> sn: Bush
> description: one of the most influential female artists of the twentieth century
> I attach the complete code as a JUnit test case. The code (and the test case) works with other LDAP servers (Sun Java System Directory Server 5.2 for instance) as expected (entry with two description values).
> I was not able to create a comparable problem with an add operation with JNDI. I assume that the corresponding BasicAttributes class within JNDI and its LDAP provider combines/consolidates the attributes on its own, which results in one attribute with two values.

-- 
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-643) Netscape SDK: Adding an entry with two description attributes does not combine values.

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

Stefan Zoerner updated DIRSERVER-643:
-------------------------------------

    Priority: Minor  (was: Major)

Priority "minor" is more appropriate here. Most of our users will never ever see this situation. Sorry for the wrong level when I raised the issue.

> Netscape SDK: Adding an entry with two description attributes does not combine values.
> --------------------------------------------------------------------------------------
>
>          Key: DIRSERVER-643
>          URL: http://issues.apache.org/jira/browse/DIRSERVER-643
>      Project: Directory ApacheDS
>         Type: Bug

>     Versions: 1.0-RC3
>  Environment: ApacheDS 1.0 RC 3
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
> Microsoft Windows XP version 5.1 Service Pack 1
>     Reporter: Stefan Zoerner
>     Priority: Minor
>  Attachments: AddDupplicateAttributeTest.java
>
> Here is a strange behavior, which I am only able to demonstrate with Netscape LDAP SDK for Java (or compatible APIs like Sun or Mozilla). I create an LDAPEntry with two separate LDAPAttribute objects for two description values in the LDAPAttributeSet. 
> ...
> LDAPAttributeSet attrs = new LDAPAttributeSet();
> LDAPAttribute ocls = new LDAPAttribute("objectclass", new String[] { "top", "person" });
> attrs.add(ocls);
> attrs.add(new LDAPAttribute("sn", "Bush"));
> attrs.add(new LDAPAttribute("cn", "Kate Bush"));
>         
> String descr[] = {
>    "a British singer-songwriter with an expressive four-octave voice",
>    "one of the most influential female artists of the twentieth century" };
>         
> attrs.add(new LDAPAttribute("description", descr[0]));
> attrs.add(new LDAPAttribute("description", descr[1]));
> ...
> After creation, the outcome is an entry within ApacheDS with only one of the description values: 
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> cn: Kate Bush
> sn: Bush
> description: one of the most influential female artists of the twentieth century
> I attach the complete code as a JUnit test case. The code (and the test case) works with other LDAP servers (Sun Java System Directory Server 5.2 for instance) as expected (entry with two description values).
> I was not able to create a comparable problem with an add operation with JNDI. I assume that the corresponding BasicAttributes class within JNDI and its LDAP provider combines/consolidates the attributes on its own, which results in one attribute with two values.

-- 
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] Reopened: (DIRSERVER-643) Netscape SDK: Adding an entry with two description attributes does not combine values.

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

Alex Karasulu reopened DIRSERVER-643:
-------------------------------------

             
Stephan is showing this bug to be present.  I'm going to take another look this time using netscape API instead of JNDI.

> Netscape SDK: Adding an entry with two description attributes does not combine values.
> --------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-643
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-643
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.0-RC3
>         Environment: ApacheDS 1.0 RC 3
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
> Microsoft Windows XP version 5.1 Service Pack 1
>            Reporter: Stefan Zoerner
>         Assigned To: Alex Karasulu
>            Priority: Minor
>         Attachments: AddDupplicateAttributeTest.java
>
>
> Here is a strange behavior, which I am only able to demonstrate with Netscape LDAP SDK for Java (or compatible APIs like Sun or Mozilla). I create an LDAPEntry with two separate LDAPAttribute objects for two description values in the LDAPAttributeSet. 
> ...
> LDAPAttributeSet attrs = new LDAPAttributeSet();
> LDAPAttribute ocls = new LDAPAttribute("objectclass", new String[] { "top", "person" });
> attrs.add(ocls);
> attrs.add(new LDAPAttribute("sn", "Bush"));
> attrs.add(new LDAPAttribute("cn", "Kate Bush"));
>         
> String descr[] = {
>    "a British singer-songwriter with an expressive four-octave voice",
>    "one of the most influential female artists of the twentieth century" };
>         
> attrs.add(new LDAPAttribute("description", descr[0]));
> attrs.add(new LDAPAttribute("description", descr[1]));
> ...
> After creation, the outcome is an entry within ApacheDS with only one of the description values: 
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> cn: Kate Bush
> sn: Bush
> description: one of the most influential female artists of the twentieth century
> I attach the complete code as a JUnit test case. The code (and the test case) works with other LDAP servers (Sun Java System Directory Server 5.2 for instance) as expected (entry with two description values).
> I was not able to create a comparable problem with an add operation with JNDI. I assume that the corresponding BasicAttributes class within JNDI and its LDAP provider combines/consolidates the attributes on its own, which results in one attribute with two values.

-- 
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-643) Netscape SDK: Adding an entry with two description attributes does not combine values.

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

Emmanuel Lecharny resolved DIRSERVER-643.
-----------------------------------------

    Resolution: Invalid
      Assignee: Emmanuel Lecharny

After further investigation, this is not a ApacheDS bug, but more likely a NetScape bug.

I have added a Junit testCase to checkj that if we add two values to an existing attributes, then those two values are correctly added and stored.

The code looks like :
...
        Attributes attrs = new BasicAttributes( true );
        Attribute attr = new BasicAttribute( "description", "a British singer-songwriter with an expressive four-octave voice" );
        attr.add( "one of the most influential female artists of the twentieth century" );
        attrs.put( attr );
...

Note that we just create one single BasicAttribute. I suspect that in Netscape Ldap API, the very same command try to put two BasicAttribute into the BasicAttributes, so that the first one is just discarded (to be investigated by NetScape guys ;)

For us, everything seems fine, to be double checked.

> Netscape SDK: Adding an entry with two description attributes does not combine values.
> --------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-643
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-643
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.0-RC3
>         Environment: ApacheDS 1.0 RC 3
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
> Microsoft Windows XP version 5.1 Service Pack 1
>            Reporter: Stefan Zoerner
>         Assigned To: Emmanuel Lecharny
>            Priority: Minor
>         Attachments: AddDupplicateAttributeTest.java
>
>
> Here is a strange behavior, which I am only able to demonstrate with Netscape LDAP SDK for Java (or compatible APIs like Sun or Mozilla). I create an LDAPEntry with two separate LDAPAttribute objects for two description values in the LDAPAttributeSet. 
> ...
> LDAPAttributeSet attrs = new LDAPAttributeSet();
> LDAPAttribute ocls = new LDAPAttribute("objectclass", new String[] { "top", "person" });
> attrs.add(ocls);
> attrs.add(new LDAPAttribute("sn", "Bush"));
> attrs.add(new LDAPAttribute("cn", "Kate Bush"));
>         
> String descr[] = {
>    "a British singer-songwriter with an expressive four-octave voice",
>    "one of the most influential female artists of the twentieth century" };
>         
> attrs.add(new LDAPAttribute("description", descr[0]));
> attrs.add(new LDAPAttribute("description", descr[1]));
> ...
> After creation, the outcome is an entry within ApacheDS with only one of the description values: 
> dn: cn=Kate Bush,dc=example,dc=com
> objectclass: top
> objectclass: person
> cn: Kate Bush
> sn: Bush
> description: one of the most influential female artists of the twentieth century
> I attach the complete code as a JUnit test case. The code (and the test case) works with other LDAP servers (Sun Java System Directory Server 5.2 for instance) as expected (entry with two description values).
> I was not able to create a comparable problem with an add operation with JNDI. I assume that the corresponding BasicAttributes class within JNDI and its LDAP provider combines/consolidates the attributes on its own, which results in one attribute with two values.

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