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

ApacheDS doesn't return all the attributes when invoking DirContext.getAttributes(Name, null)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • None
    • None
    • None
    • None

    Description

      ApacheDS doesn't return all the attributes when invoking javax.naming.directory.DirContext.getAttributes(Name, null)

      Running some unit tests as described here: http://directory.apache.org/apacheds/1.5/42-using-apacheds-for-unit-tests.html
      Using a ldif file.

      When the following code is esecuted:
      ...
      env.put("java.naming.ldap.attributes.binary",
      ATTR_OBJECTSID ' ' ATTR_OBJECTGUID+ ' '+"entryUUID");
      ctx = javax.naming.ldap.InitialLdapContext(env,null);
      .....
      attrIds = null;
      attrs = ctx.getAttributes(distinguishedName, attrIds);

      attrs doesn't contain ALL the attributes as specified by the JavaDoc
      attrIds - the identifiers of the attributes to retrieve. null indicates that all attributes should be retrieved;
      http://docs.oracle.com/javase/6/docs/api/javax/naming/directory/DirContext.html#getAttributes(javax.naming.Name, java.lang.String[])

      Using the same code against other directory servers returns all the attributes.

      -----------
      Returned:
      dn: ou=3809,ou=system
      objectclass: organizationalUnit
      objectclass: top
      ou: 3809
      description: Description goes here
      l: testgroup@test.com
      postalcode: Group Name

      Expected:
      dn: ou=3809,ou=system
      objectclass: organizationalUnit
      objectclass: top
      ou: 3809
      description: Description goes here
      l: testgroup@test.com
      postalcode: Group Name
      createTimestamp: 20120316074659Z
      creatorsName: 0.9.2342.19200300.100.1.1=admin,2.5.4.11=system
      entryCSN: 20120316074659.800000Z#000000#000#000000
      entryParentId: 1
      entryUUID:: ZjBkNDQ5NjUtMDMxMy00YWI2LTg5YzMtYzY0NDQ5N2YwOWVh
      -------
      Log:

      6:49:38 [DEBUG] registries.DefaultSchemaObjectRegistry - Found ATTRIBUTE_TYPE ( 2.16.840.1.113730.3.1.34
      NAME 'ref'
      DESC namedref: subordinate referral URL
      EQUALITY caseExactMatch
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
      USAGE distributedOperation
      )
      with oid: ref (DefaultSchemaObjectRegistry.java:181)
      16:49:38 [DEBUG] handlers.SearchHandler - Sending ou=3809,ou=system (SearchHandler.java:401)
      16:49:38 [DEBUG] filterchain.IoFilterEvent - Event MESSAGE_RECEIVED has been fired for session 3 (IoFilterEvent.java:118)

      Attachments

        Activity

          People

            Unassigned Unassigned
            jalcazar Javier Alcázar
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: