[keycloak-user] ClassCastException on UsersResource search API

Stian Thorgersen sthorger at redhat.com
Wed Jun 15 06:58:18 EDT 2016


Admin client lib requires RestEasy. If you're using WildFly or JBoss EAP
you can create a module for the admin client library and add RestEasy
dependencies to that.

On 15 June 2016 at 08:44, Haim Vana <haimv at perfectomobile.com> wrote:

> Hi,
>
>
>
> We are using KeyCloak 1.9.3, when trying to search a user with the API
> (usersResource.search) we are getting ClassCastException.
>
> The problem is that KeyCloak resteasy (version 3.0.16) ClientWebTarget is explicitly using ResteasyUriBuilder and at runtime we are getting our Jersey JerseyUriBuilder.
>
>
> Any idea how to overcome it ? assuming we can't remove the Jersey dependency.
>
>
>
> Exception stack trace:
>
> java.lang.ClassCastException:
> org.glassfish.jersey.uri.internal.JerseyUriBuilder cannot be cast to
> org.jboss.resteasy.specimpl.ResteasyUriBuilder
>
>                 at
> org.jboss.resteasy.client.jaxrs.internal.ClientWebTarget.queryParamNoTemplate(ClientWebTarget.java:289)
>
>                 at
> org.jboss.resteasy.client.jaxrs.internal.proxy.processors.webtarget.QueryParamProcessor.apply(QueryParamProcessor.java:23)
>
>                 at
> org.jboss.resteasy.client.jaxrs.internal.proxy.processors.webtarget.QueryParamProcessor.apply(QueryParamProcessor.java:12)
>
>                 at
> org.jboss.resteasy.client.jaxrs.internal.proxy.processors.AbstractCollectionProcessor.buildIt(AbstractCollectionProcessor.java:76)
>
>                 at
> org.jboss.resteasy.client.jaxrs.internal.proxy.processors.webtarget.AbstractWebTargetCollectionProcessor.build(AbstractWebTargetCollectionProcessor.java:22)
>
>
>
>
>
> Thanks,
>
> Haim.
> The information contained in this message is proprietary to the sender,
> protected from disclosure, and may be privileged. The information is
> intended to be conveyed only to the designated recipient(s) of the message.
> If the reader of this message is not the intended recipient, you are hereby
> notified that any dissemination, use, distribution or copying of this
> communication is strictly prohibited and may be unlawful. If you have
> received this communication in error, please notify us immediately by
> replying to the message and deleting it from your computer. Thank you.
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160615/e7b7a1fb/attachment.html 


More information about the keycloak-user mailing list