directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: [LDAP API 1.0.0-RC2] server side sorting control with DSMLv2
Date Sat, 28 Jan 2017 08:32:35 GMT


Le 27/01/2017 à 19:13, clauds2x@gmail.com a écrit :
> Thanks for the fix.
>
> As I wrote initially I had already tried with registering the two
> factories and got a ClassCastException.
> I tried now with RC3 but as suspected I still get the same
> ClassCastException:
>
> java.lang.ClassCastException:
> org.apache.directory.api.dsmlv2.DsmlControl cannot be cast to
> org.apache.directory.api.ldap.model.message.controls.SortRequest
> org.apache.mina.filter.codec.ProtocolEncoderException:
> java.lang.ClassCastException:
> org.apache.directory.api.dsmlv2.DsmlControl cannot be cast to
> org.apache.directory.api.ldap.model.message.controls.SortRequest
>     at
> org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:330)
>     at
> org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:629)
>     at
> org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1500(DefaultIoFilterChain.java:48)
>     at
> org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.filterWrite(DefaultIoFilterChain.java:957)
>     at
> org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.filterWrite(DefaultIoFilterChain.java:881)
>     at
> org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:629)
>     at
> org.apache.mina.core.filterchain.DefaultIoFilterChain.fireFilterWrite(DefaultIoFilterChain.java:622)
>     at
> org.apache.mina.core.session.AbstractIoSession.write(AbstractIoSession.java:574)
>     at
> org.apache.mina.core.session.AbstractIoSession.write(AbstractIoSession.java:519)
>     at
> org.apache.directory.ldap.client.api.LdapNetworkConnection.writeRequest(LdapNetworkConnection.java:4244)[88:org.apache.directory.api.ldap.client.api:1.0.0.RC3-SNAPSHOT]
>     at
> org.apache.directory.ldap.client.api.LdapNetworkConnection.searchAsync(LdapNetworkConnection.java:1838)[88:org.apache.directory.api.ldap.client.api:1.0.0.RC3-SNAPSHOT]
>     at
> org.apache.directory.ldap.client.api.LdapNetworkConnection.search(LdapNetworkConnection.java:1865)[88:org.apache.directory.api.ldap.client.api:1.0.0.RC3-SNAPSHOT]
>
> ...
>
> Caused by: java.lang.ClassCastException:
> org.apache.directory.api.dsmlv2.DsmlControl cannot be cast to
> org.apache.directory.api.ldap.model.message.controls.SortRequest
>     at
> org.apache.directory.api.ldap.codec.controls.sort.SortRequestFactory.newCodecControl(SortRequestFactory.java:35)
>     at
> org.apache.directory.api.ldap.codec.osgi.DefaultLdapCodecService.newControl(DefaultLdapCodecService.java:275)
>     at
> org.apache.directory.api.ldap.codec.api.MessageDecorator.addControl(MessageDecorator.java:340)[89:org.apache.directory.api.ldap.codec.core:1.0.0.RC3-SNAPSHOT]
>     at
> org.apache.directory.api.ldap.codec.decorators.SearchRequestDecorator.addControl(SearchRequestDecorator.java:1118)
>     at
> org.apache.directory.api.ldap.codec.decorators.SearchRequestDecorator.addControl(SearchRequestDecorator.java:83)
>     at
> org.apache.directory.api.ldap.codec.api.MessageDecorator.getDecorator(MessageDecorator.java:225)[89:org.apache.directory.api.ldap.codec.core:1.0.0.RC3-SNAPSHOT]
>     at
> org.apache.directory.api.ldap.codec.api.LdapEncoder.encodeMessage(LdapEncoder.java:159)[89:org.apache.directory.api.ldap.codec.core:1.0.0.RC3-SNAPSHOT]
>     at
> org.apache.directory.api.ldap.codec.protocol.mina.LdapProtocolEncoder.encode(LdapProtocolEncoder.java:82)
>     at
> org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:299)
>
> I have the feeling that some link between DSML and codec is missing
> for the (sort) control...

Most certainly. D you have a fragment of code I can play with to find
out what's going on ?

-- 
Emmanuel Lecharny

Symas.com
directory.apache.org


Mime
View raw message