You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2007/01/05 21:15:28 UTC

[jira] Commented: (DIRSERVER-783) Adding another value to an attribute results in the value to be added twice

    [ https://issues.apache.org/jira/browse/DIRSERVER-783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462592 ] 

Emmanuel Lecharny commented on DIRSERVER-783:
---------------------------------------------

Ok, the problem has been insolated. When we ask for a modification of an entry, we do the following operations :
1) in SchemaService, we clone the entry
2) then we apply the modification on the clone, to check that the modification is acceptable
3) we go down the interceptor chain to EventService where we get again the original entry (the clone has been ditched)
4) in JdbmBackend, we finally apply the modification.

But at thsi point, the clone is still alive, and as stated by Java doco of Basic Attribute.clone() :
"Makes a copy of the attribute. The copy contains the same attribute values as the original attribute: the attribute values are not themselves cloned"

So we are in a bad position here ...

We gonna find a workaround.

> Adding another value to an attribute results in the value to be added twice
> ---------------------------------------------------------------------------
>
>                 Key: DIRSERVER-783
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-783
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Ubuntu 6.06, Java 1.5, Jetspeed-2
>            Reporter: Ate Douma
>            Priority: Critical
>             Fix For: 1.0.1
>
>         Attachments: AddingAnotherValueToAnAttribute.java, AddingAnotherValueToAnAttribute.java, apacheds-stderr.log, apacheds-stdout.log
>
>
> If I add a new attribute to a class, its value is stored fine.
> But, if I thereafter add another value for the same attribute, this value is added twice.
> I encountered this with Jetspeed-2 ldap unit tests, but could then easily reproduce this with for instance LDAP Browser\Editor v.2.8.2

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