an LDAPRebind or LDAPBind interface has to be implemented.
In you case, I think the LDAPSearchResults contains the exception objects due to failure on referral.
Quote the doc below,
(or visit http://docs.sun.com/source/816-5618-10/netscape/ldap/LDAPConstraints.html#setReferrals(boolean) )
-------------------------------------------------
setReferrals
public void setReferrals(boolean doReferrals)
Specifies whether or not referrals are followed automatically. Specify true if referrals are to be followed automatically, or false if referrals are to throw an LDAPReferralException. (By default, this is set to false.)
If you set this to true, you need to create an object of this class that implements either the LDAPRebind or LDAPBind interface. The LDAPRebind object identifies the method for retrieving authentication information which will be used when connecting to other LDAP servers during referrals. This object should be passed to the setRebindProc method. Alternatively, the LDAPBind object identifies an authentication mechanism to be used instead of the default authentication mechanism when following referrals. This object should be passed to the setBindProc method.
Parameters:
doReferrals - set to true if referrals should be followed automatically, or False if referrals should throw an LDAPReferralException
-----------------------------------------------------------
-ey
Jon Roberts wrote:
I am using the Mozilla/Netscape Java Director SDK v4.1. I attempt to set a connection to follow referrals with:
LDAPSearchConstraints cons = anon_conn.getSearchConstraints(); cons.setReferrals(true); anon_conn.setSearchConstraints(cons);
No referral exception (good), but I get:
java.lang.ArrayStoreException at java.lang.System.arraycopy(Native Method) at java.util.Vector.copyInto(Vector.java:162) at netscape.ldap.LDAPSearchResults.sort(LDAPSearchResults.java:300)
when I attempt to sort. Is there a restriction against sorting referred results? Can I get this working in some other way?
Jon Roberts www.mentata.com
