1
votes

I'm writing a suite of microservices using Quarkus. These services will be protected using Quarkus' Keycloak extension. That interaction works great and without problem. Now I'm trying to add functionality to my microservices that will essentially broker communication with Keycloak and allow me to create users/groups/roles programmatically using the Keycloak admin client. I've added the Keycloak admin client dependency to my pom.xml:

    <dependency>
        <groupId>org.keycloak</groupId>
        <artifactId>keycloak-admin-client</artifactId>
        <version>${version.keycloak}</version>
    </dependency>

My code also compiles with no problem. However, when I run it and attempt to, for example, get a list of users within my Keycloak realm, I get the following exception:

java.lang.IncompatibleClassChangeError: Found interface org.jboss.resteasy.client.jaxrs.ResteasyClient, but class was expected

I've implemented functionality like this before in other projects, but never one that uses Quarkus as its underlying implementation framework. So, my guess is it has something to do with that. But I've never seen an error like this. Can anyone give me some insight into how to get around this issue?

1

1 Answers

0
votes

java.lang.IncompatibleClassChangeError is thrown because org.jboss.resteasy.client.jaxrs.ResteasyClient has been changed from class to interface since Resteasy version 4.0.

So, you should use Resteasy version 3.x.