Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-4586

Subject diagnostics incorrectly printing subject Id for identifier test

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 2.5.23, 2.6.0
    • subject API
    • None

    Description

      Diagnostics report

      WARNING: No subject found by id in 0ms: '10001111'
               with SubjectFinder.findByIdAndSource("10001111", "Active Directory", false)
      ERROR: Exception thrown when finding subject by id in 4ms: '10001111'
               with SubjectFinder.findByIdentifierAndSource("sAMAccountName", "Active Directory", false)
      edu.internet2.middleware.subject.SourceUnavailableException: Ldap Exception: Problem with ldap conection: Active_Directory,
      Error querying ldap server id: Active_Directory, searchDn: ou=users,dc=internet2,dc=edu, filter: 'ou=users,dc=internet2,dc=edu', returning attributes: null
      

      SubjectSourceDiagnostics.java

              if (subject != null) {
                subjectApiReport.append("<font color='green'>SUCCESS:</font> Found subject by identifier in " + millis + "ms: '" + GrouperUtil.xmlEscape(subjectIdentifier) + "'\n         with SubjectFinder.findByIdentifierAndSource(\"" + GrouperUtil.xmlEscape(subjectIdentifier) + "\", \"" + GrouperUtil.xmlEscape(sourceId) + "\", false)\n");
              } else if (exception == null) {
                subjectApiReport.append("<font color='orange'>WARNING:</font> No subject found by identifier in " + millis + "ms: '" + GrouperUtil.xmlEscape(subjectIdentifier) + "'\n         with SubjectFinder.findByIdentifierAndSource(\"" + GrouperUtil.xmlEscape(subjectIdentifier) + "\", \"" + GrouperUtil.xmlEscape(sourceId) + "\", false)\n");
              } else {
                subjectApiReport.append("<font color='red'>ERROR:</font> Exception thrown when finding subject by id in " + millis + "ms: '" + GrouperUtil.xmlEscape(subjectId) + "'\n         with SubjectFinder.findByIdentifierAndSource(\"" + GrouperUtil.xmlEscape(subjectIdentifier) + "\", \"" + GrouperUtil.xmlEscape(sourceId) + "\", false)\n");
                subjectApiReport.append(ExceptionUtils.getFullStackTrace(exception));
              }
      

      Note the subject identifier tests reports the subjectId from an unrelated part of the code, and "finding subject by id" in one of the 3 subject identifier cases.

      Attachments

        Activity

          People

            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            chad.redman.3@at.internet2.edu Chad Redman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: