The new issue came with the fix. If I have a match and try to use LDAPSearchResults.getCount() to find out how many entries, as a referral I only always get "1", even with setBatchSize(0) on the search constraints. Of course, sorting clears this up before a getCount() call, but obviously that isn't an option if a limit is involved. I see code in the getCount() method to handle referrals appropriately, but it doesn't seem to be happening. Since I am assuming server sizelimits can cause the same behavior, this could be a bigger problem. Hopefully, this helps. I'll be happy to submit a bug if advised.
Jon Roberts www.mentata.com
> 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?
