directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fisher <dfis...@vt.edu>
Subject Re: ClassCast Exception with Paging
Date Wed, 04 Dec 2013 15:38:23 GMT
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
View raw message