[keycloak-user] ClassCastException on UsersResource search API
Haim Vana
haimv at perfectomobile.com
Wed Jun 15 07:03:24 EDT 2016
We have rest easy dependencies – see below, the problem is that in addition to it we also have Jersey dependency, and at runtime the RuntimeDelegate picks up the Jersey implementation.
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson2-provider</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-multipart-provider</artifactId>
</dependency>
Haim.
From: Stian Thorgersen [mailto:sthorger at redhat.com]
Sent: Wednesday, June 15, 2016 1:58 PM
To: Haim Vana <haimv at perfectomobile.com>
Cc: keycloak-user at lists.jboss.org
Subject: Re: [keycloak-user] ClassCastException on UsersResource search API
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<mailto: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<mailto:keycloak-user at lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/keycloak-user<https://emea01.safelinks.protection.outlook.com/?url=https%3a%2f%2flists.jboss.org%2fmailman%2flistinfo%2fkeycloak-user&data=01%7c01%7chaimv%40perfectomobile.com%7ca9370477d9ce449e7bf308d3950bf64e%7cceb4c662d6994e7da0bd272619a46977%7c1&sdata=9QN2%2bItkI4HjwH0%2f6UZmMSOg8KJjyYxbfQJgz0QHbvs%3d>
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160615/b4a3d7f8/attachment-0001.html
More information about the keycloak-user
mailing list