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

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

问题描述

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

We are seeing this warning messages in our logs

javax.naming.PartialResultException:未处理的继续引用;剩余名称 'dc=global,dc=com'

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

It appears whenever users log-in to our application.

根据 this SO post,可以通过设置 Context.REFERRALfollow.但它会将搜索时间从 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.

[Referral:当您在 AD 中搜索时,如果 AD 认为在另一个地方有更多可用信息,它会在您的搜索结果中返回一个推荐 [place to find more info].]

[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天全站免登陆