我基本上走在Active Directory中的LDAP树上。带有Active Directory的JNDI PartialResultException
在每一级我查询"(objectClass=*)"
。当我在根上执行此操作时,例如"dc=example,dc=com"
,我会在下面得到例外。这对我们的其他LDAP实例工作正常。出于某种原因,仅在我们的Active Directory服务器上出现此异常。在我们的Active Directory服务器上使用JXplorer时,我也会遇到同样的异常。
从网上阅读我发现有人说你应该打开下面,不知道这意味着什么...所以我的控制对象(javax.naming.directory.SearchControls
),我通过查询传递searchControls.setDerefLinkFlag(true)
。我也尝试将它设置为false
,结果相同。任何关于还有什么可能导致这种情况的建议?也许我该如何修复它?
注意:在这篇文章中,我将baseDn从dc=<my company domain>
更改为我公司隐私的示例。
javax.naming.PartialResultException: Unprocessed Continuation Reference(s); remaining name 'dc=example,dc=com'
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2820)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2794)
at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1826)
at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1749)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:368)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:338)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:321)
at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:248)
at com.motio.pi.gui.panels.useraccess.ldap.LDAPConnector.query(LDAPConnector.java:262)
at com.motio.pi.gui.selector.directory.CognosDirectoryBrowserController.expandCognosTreeNode(CognosDirectoryBrowserController.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.motio.pi.utils.PIThreadDelegate$1.run(PIThreadDelegate.java:54)
at java.lang.Thread.run(Thread.java:662)
@startoftext:中 - 当然,它解决了PartialResultException问题,但它使得搜索速度较慢。请参阅http://stackoverflow.com/questions/14136091/ldap-search-is-very-slow。事实上,'追踪'需要4秒,没有'追踪'需要1秒。请咨询,如果你有任何解决方案。 – 2013-05-07 05:31:02
@Karthik Bose我不再与ldap一起工作,所以对不起,我无法帮忙。 – startoftext 2013-05-07 17:11:25
(对于其他人)如果上述解决方案不起作用,您可以尝试以下两件事:**(1)**当您提及该名称时更具体(例如:'OU = Accounts,DC = x, DC = y'而不是DC = x,DC = y' **(2)**将LDAP端口号更改为** 3268 **(而不是** 389 **) – 2015-11-24 09:04:18