如何解决javax.naming.PartialResultException? [英] How to resolve javax.naming.PartialResultException?

查看:1310
本文介绍了如何解决javax.naming.PartialResultException?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在日志中看到此警告消息

We are seeing this warning messages in our logs

javax.naming.PartialResultException: Unprocessed Continuation Reference(s); remaining name 'dc=global,dc=com'

每当用户登录到我们的应用程序时,它就会出现.

It appears whenever users log-in to our application.

根据此SO帖子,可以通过设置follow.但是它将搜索时间从1秒增加到4秒.

As per this SO post, it can be resolved, by setting Context.REFERRAL to follow. But it increases the search time from 1 second to 4 seconds.

实际上,您可以参考这篇SO帖子,它表示使用follow放慢搜索速度.

In fact you can refer this SO post, it says using follow slows down the search.

所以我的问题是,在不影响性能的情况下从日志中消除此异常的最佳方法是什么?

So my question is, what is the best way to get rid of this exception from our logs without affecting performance?.

推荐答案

确定.当您的搜索返回引荐并且设置为忽略引荐时,您将看到此异常.

OK. You will be seeing this exception, when your search returns referral and you set to ignore the referral.

[引荐:当您在AD中搜索时,如果AD认为其他地方有更多信息,它将返回引荐[查找更多信息的地方]以及您的搜索结果.]

[Referral: When you search in AD, if AD thinks there are more information available in another place, it returns a referral [place to find more info] along with your search results.]

您可以通过将Context.REFERRAL设置为follow来避免此异常.然后它将也在引荐中搜索[这就是为什么要花更多时间返回结果的原因].

You could avoid this exception by setting Context.REFERRAL to follow. Then it would search in the referral also [That's why it takes more time to return result].

但是在我的情况下,引用无效,并返回了另一个异常.

But in my case the referral is invalid and returned an another exception.

我通过更改baseDN(搜索库)使其更具体来解决此问题.例如. ou=users,dc=mydomain,dc=com.现在,我没有看到此异常,因为它不会返回任何引荐.

I fixed this issue by changing the baseDN (search base) to be more specific. E.g. ou=users,dc=mydomain,dc=com. Now I'm not seeing this exception, because it doesn't return any referral.

这篇关于如何解决javax.naming.PartialResultException?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆