Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-705

object class top missing in search result, if scope is base and attribute objectClass is requested explicitly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-RC4
    • 1.0-RC4, 1.5.0
    • None
    • None
    • * ApacheDS 1.0 RC4 SNAPSHOT
      * Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
      * Windows XP Professional SP2

    Description

      In some rare circumstances, object class top is is missing from the search result, although the object classes are requested.
      Here is an example.

      Import an entry like this:

      dn: cn=Heather Nova,dc=example,dc=com
      objectclass: top
      objectclass: person
      cn: Heather Nova
      sn: Nova
      description: a singer-songwriter and poet based in Bermuda

      i.e.

      $ ldapmodify -h localhost -p 389 -D "uid=admin,ou=system" -w ***** -a -f heather.ldif
      adding new entry cn=Heather Nova,dc=example,dc=com
      $

      Then perform a search request with the following parameters

      $ ldapsearch -h localhost -p 389 -D "uid=admin,ou=system" -w ***** -b "cn=Heather Nova,dc=example,dc=com" -s base "(objectclass=*)" objectclass
      version: 1
      dn: cn=Heather Nova,dc=example,dc=com
      objectclass: person
      $

      Object class "top" is missing from the search result! This is not the case, if abjectClass is not requested by parameter:

      $ ldapsearch -h localhost -p 389 -D "uid=admin,ou=system" -w ***** -b "cn=Heather Nova,dc=example,dc=com" -s base "(objectclass=*)"
      version: 1
      dn: cn=Heather Nova,dc=example,dc=com
      description: a singer-songwriter and poet based in Bermuda
      objectclass: person
      objectclass: top
      sn: Nova
      cn: Heather Nova
      $

      Note: Afterwards (after the last search call), the object class "top" is returned with the first request, as well (cache?):

      $ ldapsearch -h localhost -p 389 -D "uid=admin,ou=system" -w ***** -b "cn=Heather Nova,dc=example,dc=com" -s base "(objectclass=*)" objectclass
      version: 1
      dn: cn=Heather Nova,dc=example,dc=com
      objectclass: person
      objectclass: top
      $

      I have created a JUnit test with JNDI, which demonstrates the defect. I'll attach it to this issue soon.

      Attachments

        1. SearchForObjectClassesTest.java
          4 kB
          Stefan Zoerner

        Activity

          People

            akarasulu Alex Karasulu
            szoerner Stefan Zoerner
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: