Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-1968

NPE in GoverningStructureRuleVirtualAttributeProvider if entry has no structural object classes

    XMLWordPrintable

    Details

    • Support Ticket IDs:
    • Sprint:
      Sustaining Sprint 3, Sustaining Sprint 4, DJ Sustaining 4, DJ Sustaining 5

      Description

      Reading all operational attributes from the following entry causes a NPE inside the GoverningStructureRuleVirtualAttributeProvider:

      dn: ou=dashboardService,ou=services,dc=amreplication,dc=org
      objectClass: sunService
      objectClass: top
      ou: dashboardService
      createTimestamp: 20150315093848Z
      creatorsName: cn=Directory Manager,cn=Root DNs,cn=config
      entryUUID: c5ec06b4-8cad-4bdb-a2d2-7c9ff8ae7ca3
      
      $ bin/ldapsearch -D "cn=Directory manager" -w password -h localhost -p 1389 -b ou=dashboardservice,ou=services,dc=amreplication,dc=org -s base "(&)" +
      SEARCH operation failed
      Result Code:  80 (Other)
      Additional Information:  An unexpected error was encountered while processing a search in one of the Directory Server backends:  NullPointerException()
      

      The schema definition for 'sunService' is not present.

      The NPE is thrown at the start of GoverningStructureRuleVirtualAttributeProvider.getDITStructureRule(), because getNameForm is being called with a null oc.

        private DITStructureRule getDITStructureRule(Entry entry)
        {
          ObjectClass oc = entry.getStructuralObjectClass();
          List<NameForm> listForms = DirectoryServer.getNameForm(oc);
      [...]
      

        Attachments

          Activity

            People

            • Assignee:
              patrickdiligent patrick diligent
              Reporter:
              cjr Chris Ridd
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: