Le 09/12/14 10:38, amit nanda a écrit :
> Hi,
>
> I want to query around 100,000 records from Apache DS, thus i wanted to
> use PagedResultsDirContextProcessor to read in batches, but i am getting
> error on the second page read.
>
> org.springframework.ldap.OperationNotSupportedException: [LDAP: error code
> 53 - Invalid cookie for this PagedSearch request.]; nested exception is
> javax.naming.OperationNotSupportedException: [LDAP: error code 53 - Invalid
> cookie for this PagedSearch request.]; remaining name 'ou=system'
>
>
> Here is the sample code that i am using
>
> Set results = new HashSet();
> PagedResultsDirContextProcessor processor = new
> PagedResultsDirContextProcessor(10);
>
> final SearchControls searchControls = new SearchControls();
> searchControls.setSearchScope(SearchControls.SUBTREE_SCOPE);
> searchControls.setReturningAttributes(new String[]{"*"});
> searchControls.setReturningObjFlag(true);
>
> do {
> ESMAttributesMapper mapper = new ESMAttributesMapper();
> results.addAll(ldapTemplate.search("ou=system", "(objectClass=asoc-es)",
> searchControls, mapper, processor));
> processor = new PagedResultsDirContextProcessor(10, processor.getCookie());
> } while (processor.getCookie().getCookie() != null);
>
> i am using Spring LDAP for this.

What version of ApacheDS are you using ?

Can you set logs on the server ?


Reply via email to