-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use rest-client-reactive-jackson together with quarkus-keycloak-admin-client #20505
Comments
@sberyozkin did we not have a replacement for this one? |
Hi @geoand No, I don't see how it can happen as it is a Keycloak managed library which uses the |
The same would be the case for |
Thanks for the information. How do we plan to tackle this? |
I took a brief look at |
I'd be happy to help with ^, @sberyozkin do you know who in the keycloak team I could contact about it? |
Any news on this @geoand @sberyozkin? |
The same issue is present with quarkus-resteasy-mutiny when following mongodb-panache guide Should I open a separate issue for quarkus-resteasy-mutiny or this issue could be a general one amongst all extensions? |
@sberyozkin I think this is something we need to tackle soon :) |
What do you mean exactly? |
Firstly I have to say that I'm just getting started with quarkus so there's a chance I only misconfigured something. I started to setup my project based on mongodb-panache guide I have this <properties>
<compiler-plugin.version>3.8.1</compiler-plugin.version>
<maven.compiler.parameters>true</maven.compiler.parameters>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.version>2.5.4.Final</quarkus.platform.version>
<surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-mongodb-rest-data-panache</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-mutiny</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive-jackson</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-arc</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus.platform.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>build</goal>
<goal>generate-code</goal>
<goal>generate-code-tests</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<parameters>${maven.compiler.parameters}</parameters>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>native</id>
<activation>
<property>
<name>native</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<systemPropertyVariables>
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<quarkus.package.type>native</quarkus.package.type>
</properties>
</profile>
</profiles>
|
Same here after including the reactive RESTEasy dependencies together with Mutiny. Edit: according to the dependency tree, the RESTEasy dependency comes with Mutiny:
Excluding io.quarkus:quarkus-resteasy does work in my case
|
@geoand I think we will need a solution for that if we want to move to RESTEasy Reactive as the default REST layer. I'm not sure how we could fix it exactly as I suppose the Keycloak Admin Client is currently depending on RESTEasy internals. |
Yes, that's exactly the problem... It probably won't be an easy fix, but definitely a necessary one |
@sberyozkin @pedroigor we really need a reactive version of |
Is there any efforts on this? I am building a fully reactive API and need to use the keycloak-admin-client. |
Hi All, please vote for keycloak/keycloak#9539 |
This is pretty much a straight copy of the existing Keycloak code that removes various things that are not supported by Quarkus Fixes: quarkusio#20505
This is pretty much a straight copy of the existing Keycloak code that removes various things that are not supported by Quarkus. Furthermore, the base package was changed because there are cases where the upstream Keycloak client still needs to be used (for example in a QuarkusTestResourceLifecycleManager which runs before the Quarkus application and therefore cannot use any Quarkus infrastructure) Fixes: quarkusio#20505
This is pretty much a straight copy of the existing Keycloak code that removes various things that are not supported by Quarkus. Furthermore, the base package was changed because there are cases where the upstream Keycloak client still needs to be used (for example in a QuarkusTestResourceLifecycleManager which runs before the Quarkus application and therefore cannot use any Quarkus infrastructure) Fixes: quarkusio#20505
@geoand can this be closed? |
No, it's still not in. Should be in soon. |
#24300 will likely be how we go about this |
Add first version of Keycloak admin client based on Reactive REST Client
Fixes: quarkusio#20505 (cherry picked from commit 8f259e5)
Describe the bug
I am using quarkus-keycloak-admin-client in a project and want to add rest-client-reactive-jackson. However, I cannot use both libraries together because quarkus-keycloak-admin-client uses the old rest-client internally and I cannot have two rest clients in the same project.
When starting the project with
./mvnw quarkus:dev
, it complains about the conflict as follows:Expected behavior
I can use
rest-client-reactive-jackson
together withquarkus-keycloak-admin-client
in a single project. Therefore, I would expectquarkus-keycloak-admin-client
to recognize that there is a rest client already present in the project and use that (be itquarkus-rest-client-reactive
orquarkus-rest-client
).Actual behavior
When starting the application, I get the following exception:
How to Reproduce?
Steps to reproduce the behavior:
mvn io.quarkus.platform:quarkus-maven-plugin:2.2.3.Final:create \ -DprojectGroupId=org.acme \ -DprojectArtifactId=rest-client-reactive-quickstart \ -DclassName="org.acme.rest.client.CountriesResource" \ -Dpath="/country" \ -Dextensions="resteasy-reactive-jackson,rest-client-reactive-jackson,quarkus-keycloak-admin-client"
cd rest-client-reactive-quickstart
./mvnw quarkus:dev
Output of
uname -a
orver
Darwin MacBook-Pro-KB.local 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64
Output of
java -version
openjdk version "17" 2021-09-14 OpenJDK Runtime Environment Microsoft-26987 (build 17+35) OpenJDK 64-Bit Server VM Microsoft-26987 (build 17+35, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.2.3.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.1
Additional information
./mvnw dependency:tree
reveals that Quarkus Keycloak Admin Client is using the rest client as a dependency:The text was updated successfully, but these errors were encountered: