简体   繁体   English

Spring LDAP:没有找到匹配的响应控制 - 寻找'class javax.naming.ldap.PagedResultsResponseControl

[英]Spring LDAP: No matching response control found - looking for 'class javax.naming.ldap.PagedResultsResponseControl

When I try to use PagedResultsDirContextProcessor to get users from an LDAP-Server I always get No matching response control found - looking for 'class javax.naming.ldap.PagedResultsResponseControl for every request even though I can find PagedResultsResponseControl.当我尝试使用 PagedResultsDirContextProcessor 从 LDAP 服务器获取用户时,我总是得到No matching response control found - looking for 'class javax.naming.ldap.PagedResultsResponseControl ,即使我可以找到 PagedResultsResponseControl。 How do I resolve this?我该如何解决这个问题?

Can you try doing a null check before retrieving the attribute's value.您可以在检索属性值之前尝试执行 null 检查吗? This is how I resolved it.这就是我解决它的方法。

if(attributes.get("name") != null){
   model.setName(attributes.get("name").get().toString());
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM