Issue Details (XML | Word | Printable)

Key: DIRSERVER-335
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alex Karasulu
Reporter: Stefan Zoerner
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Directory ApacheDS

Adding new object classes to an entry removes the old ones

Created: 09/Aug/05 03:59 AM   Updated: 10/Feb/06 12:34 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Java Source File Licensed for inclusion in ASF works AddObjectClassesToEntryTest.java 2005-08-10 11:00 PM Stefan Zoerner 4 kB
Java Archive File ldap.jar 2005-08-10 06:36 PM 547 kB
Java Source File LDAPModifyAddTest.java 2005-08-10 06:36 PM 3 kB
Text File Licensed for inclusion in ASF works patch_testCase_AddOpbjectClasses.txt 2005-08-10 07:29 PM Stefan Zoerner 3 kB
Environment:
Server: ApacheDS 0.9.1 on Windows XP
java version "1.5.0_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)

Client: Windows XP
Command line tool ldapadd (from IBM Tivoli Directory Server)
or Softerra LDAP Administrator 3.2

Resolution Date: 11/Aug/05 02:53 AM


 Description  « Hide
If additional objectclasses are added to an existing entry by a client, the old ones are lost.
 e.g. applying the following LDIF to ApacheDS

--8<--

# create an entry for a person
#
dn: cn=Tori Amos,ou=system
changetype: add
objectclass: top
objectclass: person
cn: Tori Amos
sn: Amos
description: an American singer-songwriter

# add objectclasses and uid
#
dn: cn=Tori Amos,ou=system
changetype: modify
add: objectclass
objectclass: organizationalPerson
objectclass: inetOrgPerson
-
add: uid
uid: tamos
-

-->8--

leaves an entry behind with only two (instead of all for objectclasses):

$ ldapadd -p 10389 -D uid=admin,ou=system -w *** -f addAndModifyObjectClasses.ldif
adding new entry cn=Tori Amos,ou=system

modifying entry cn=Tori Amos,ou=system

$ ldapsearch -p 10389 -b "ou=system" "(cn=Tori Amos)"
cn=Tori Amos,ou=system
sn=Amos
objectclass=inetOrgPerson
objectclass=organizationalPerson
cn=Tori Amos
uid=tamos
description=an American singer-songwriter

---

Expected result would be:

cn=Tori Amos,ou=system
sn=Amos
objectclass=top
objectclass=person
objectclass=inetOrgPerson
objectclass=organizationalPerson
cn=Tori Amos
uid=tamos
description=an American singer-songwriter


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #231284 Wed Aug 10 17:32:30 UTC 2005 akarasulu More corrections to the usage of LockableAttributesImpl.put(). These changes
should fix the specific problems in DIREVE-216.
Files Changed
MODIFY /directory/shared/ldap/trunk/apache-provider/src/java/org/apache/ldap/common/berlib/asn1/decoder/add/AddAttributeValueRule.java
MODIFY /directory/shared/ldap/trunk/apache-provider/src/test/org/apache/ldap/common/berlib/asn1/decoder/search/SearchResponseEntryTest.java
MODIFY /directory/shared/ldap/trunk/apache-provider/src/test/org/apache/ldap/common/berlib/asn1/decoder/add/AddRequestTest.java

Repository Revision Date User Message
ASF #231287 Wed Aug 10 17:49:15 UTC 2005 akarasulu committing test contributed by stefan from DIREVE-216
Files Changed
ADD /directory/apacheds/trunk/main/src/test/org/apache/ldap/server/AddObjectClassesToEntryTest.java