You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Maxim Solodovnik <so...@gmail.com> on 2014/09/29 06:46:10 UTC

CursorLdapReferralException while iterating EntryCursor

Hello,

I'm getting CursorLdapReferralException while iterating EntryCursor:
[1] line 258
Could you please explain the meaning of this exception? I was sure if
cursor.next() return the "true" cursor.get() should be successful.

Thanks in advance


[1]
https://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/main/java/org/apache/openmeetings/ldap/LdapLoginManagement.java?view=markup

-- 
WBR
Maxim aka solomax

Re: CursorLdapReferralException while iterating EntryCursor

Posted by Maxim Solodovnik <so...@gmail.com>.
Thanks a lot for the quick answer!


On 29 September 2014 12:37, Emmanuel Lécharny <el...@gmail.com> wrote:

> Le 29/09/14 06:46, Maxim Solodovnik a écrit :
> > Hello,
> >
> > I'm getting CursorLdapReferralException while iterating EntryCursor:
> > [1] line 258
> > Could you please explain the meaning of this exception? I was sure if
> > cursor.next() return the "true" cursor.get() should be successful.
>
> You have an entry which is a referral (ie, it has a referral ObjectClass
> in it). In this case, you have to catch the exception and handle the hop
> yourself.
>
> Atm, the LDAP API does not follow referrals internally, thus the thrown
> exception.
>
>


-- 
WBR
Maxim aka solomax

Re: CursorLdapReferralException while iterating EntryCursor

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 29/09/14 06:46, Maxim Solodovnik a écrit :
> Hello,
>
> I'm getting CursorLdapReferralException while iterating EntryCursor:
> [1] line 258
> Could you please explain the meaning of this exception? I was sure if
> cursor.next() return the "true" cursor.get() should be successful.

You have an entry which is a referral (ie, it has a referral ObjectClass
in it). In this case, you have to catch the exception and handle the hop
yourself.

Atm, the LDAP API does not follow referrals internally, thus the thrown
exception.