directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Murawski <stm...@gmail.com>
Subject Re: ClassCast Exception with Paging
Date Wed, 04 Dec 2013 16:46:33 GMT
Thanks!
This helped.
And also removing the line

pagedSearchControl.setCookie("test".getBytes("UTF-8"));

which broke the process.


2013/12/4 Daniel Fisher <dfisher@vt.edu>

> On Wed, Dec 4, 2013 at 7:06 AM, Stefan Murawski <stmura@gmail.com> wrote:
> > Unfortunately I get the following ClassCast-Exception, and don't know how
> > to proceed further.
> >
> > java.lang.ClassCastException:
> > org.apache.directory.api.ldap.codec.BasicControlDecorator cannot be cast
> to
> > org.apache.directory.api.ldap.model.message.controls.PagedResults
> >
> > for:
> >
> >                     pagedSearchControl = (PagedResults) result
> >                             .getControl(PagedResults.OID);
> >
>
> Try adding: System.setProperty(StandaloneLdapApiService.CONTROLS_LIST,
> PagedResultsFactory.class.getName());
> at the top of your code.
> I recall seeing CastClassExceptions if the ApiService doesn't know
> about the control.
>
> --Daniel Fisher
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message