当我将 Vaadin 6.7.9 更新到 6.7.10 或 6.8++ 时,我遇到了一个奇怪的问题。
错误
Caused by: java.lang.NullPointerException
at com.sun.jndi.ldap.LdapCtx.getSearchReply(Unknown Source)
at com.sun.jndi.ldap.LdapNamingEnumeration.getNextBatch(Unknown Source)
at com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreImpl(Unknown Source)
at com.sun.jndi.ldap.LdapNamingEnumeration.hasMore(Unknown Source)
at com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreElements(Unknown Source)
at java.util.Collections.list(Unknown Source)
at -----------------------------.getGroups(---.java:804)
获取组()
NamingEnumeration<SearchResult> answer = this.searchObjects(filter,
LDAPGroup.getObjectClasses(),
env.getProperty("ldap.root.group"));
getGroups(): 804 ArrayList results = Collections.list(answer);
搜索对象(...)
NamingEnumeration<SearchResult> answer;
if(filter != null){
answer = this.getDirctx().search(searchroot, filterstring, getSearchControls(filter.getLevel()));
}
else{
answer = this.getDirctx().search(searchroot, filterstring, getSearchControls(-1));
}
return answer;
来自 javax.naming.directory.DirContext.search(...) 的 Java Doc
Returns:
an enumeration of SearchResult objects
Throws:
NamingException - if a naming exception is encountered
答案不能为空。这是不可能的。vaadin 是否更改了 6.7.10 版本中使用或实现 NamingEnumeration 或其他可能导致此问题的任何依赖项?
环境:
- 终生 5.2.3
- LDAP
- Vaadin - 6.6.0 - 没有错误
- Vaadin - 6.6.8 - 没有错误
- Vaadin - 6.7.0 - 没有错误
- Vaadin - 6.7.5 - 没有错误
- Vaadin - 6.7.9 - 没有错误
- Vaadin - 6.7.10 - 错误
- Vaadin - 6.8.3 - 错误