grouper-dev - [grouper-dev] Error in LDAPSourceAdapter
Subject: Grouper Developers Forum
List archive
- From: Gagné Sébastien <>
- To: <>
- Subject: [grouper-dev] Error in LDAPSourceAdapter
- Date: Wed, 28 Nov 2012 15:14:49 -0500
Hi, For some yet-unkown reason, we have a subject that were unable to create from ou production AD. The sAMAccountName is apparently “null”, but that’s not our problem : when doing the search, this subject will be returned as a null object (that’s ok), but then you use that object and it causes an exception that is then re-thrown as a SourceUnavailableException. This is what I get from the logs, unfortunately, I don’t know what object caused it.. LdapSourceAdapter.createSubject(465) - - No value for LDAP attribute "sAMAccountName". It is Grouper attribute "SubjectID". Would it be possible to check if subject is null before using it ? Or have more informations about it ? This would allow the search to complete. My suggested fix would be something like : LdapSourceAdapter.java, line 428 FROM : SearchResult si = (SearchResult) ldapResults.next(); Attributes attributes = si.getAttributes(); Subject subject = createSubject(attributes); if (noAttrSearch) ((LdapSubject)subject).setAttributesGotten(true); result.add(subject); TO : SearchResult si = (SearchResult) ldapResults.next(); Attributes attributes = si.getAttributes(); Subject subject = createSubject(attributes); if (subject != null) { if (noAttrSearch) ((LdapSubject)subject).setAttributesGotten(true); result.add(subject); } else { log.error("Failed to create subject with attributes: " + attributes); } LdapSourceAdapter.java, line 466 FROM: log.error("No value for LDAP attribute \"" + subjectIDAttributeName + "\". It is Grouper attribute \"SubjectID\".”); TO : log.error("No value for LDAP attribute \"" + subjectIDAttributeName + "\". It is Grouper attribute \"SubjectID\". Problem subject's attributes : " attributes); Sébastien Gagné, | Analyste en informatique 514-343-6111 x33844 | Université de Montréal, | Pavillon Roger-Gaudry, local X-100-11 |
- [grouper-dev] Error in LDAPSourceAdapter, Gagné Sébastien, 11/28/2012
- [grouper-dev] RE: Error in LDAPSourceAdapter, Chris Hyzer, 11/28/2012
Archive powered by MHonArc 2.6.16.