LDAP のエントリに、いくつかの objectClasses と dc および ou 属性とその値があります。ou 属性を読み取ろうとしましたが、以下のコードでは取得できません。DC値を正しく取得できます。null であるかどうかを制御する必要があることはわかっていますが、LDAP で行われているにもかかわらず、「ou」が null になる可能性があるのはなぜですか。
NamingEnumeration answer = ctx.search(searchBaseDn, filter, ctls);
try
{
while (answer.hasMore())
{
SearchResult sr = (SearchResult) answer.next();
OrganizationPojo organizationPojo = new OrganizationPojo();
organizationPojo.setOrgDc((String)sr.getAttributes().get("dc").get());
organizationPojo.setOrgOu((String)sr.getAttributes().get("ou").get());