Keycloak-admin-client with jakarta support

i am running into a problem trying to use keycloak-admin-client with wildfly27 / java17.

wildfly27 ships with resteasy 6.1.* and uses jakarta namespace.

I cant get an instance of org.keycloak.admin.client.Keycloak using KeycloakBuilder because “The method resteasyClient(javax.ws.rs.client.Client) in the type KeycloakBuilder is not applicable for the arguments (jakarta.ws.rs.client.Client)”

Is there a plan to provide an version of keycloak-admin-client, supporting jakarta ee ?

I would like to install keycloak libs as wildfly module, trying to avoid packing them in my ear because of linkage problems with apache http-client

Does anyone has some advises?

https://search.maven.org/artifact/org.keycloak/keycloak-admin-client-jakarta

BTW: You shouldn’t invest too much effort into Wildfly, modules and EARs, as you hopefully know that the Wildfly-based distribution won’t be supported after August/September.

first of all - thank you, that helped. Diddnt found that artifact on mvnrepository.
I know that keycloak as product is moving to quarkus based product, but does this mean for future, that it wont be possible to include keycloak libs for administation of remote keycloak instances to any jakartaee server? whats the alternative. i mean we will stick on javaee as appserver :confused:

Grüße :wink:

Oh, ok, I mixed it up. Sorry, my fault. :man_facepalming:
Of course you can include it in any other web app/server if you want to use it there…

1 Like

Hi, sorry to hijack a thread, but I tried adding the keycloak-admin-client-jakarta library to my Gradle project and I’m getting the following error and I haven’t found any help online.

Could not find jackson-module-jaxb-annotations-2.14.1-jakarta.jar (com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.14.1)

even though I have an immediate dependency defined as implementation 'com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.14.1'

In my case the dependencies come from the installed environment (WildFly).
Dont know if this helps but that are the jackson libs included in wildfly:

<module name="com.fasterxml.jackson.jakarta.jackson-jakarta-json-provider" xmlns="urn:jboss:module:1.9">
    <resources>
        <resource-root path="jackson-jakarta-rs-json-provider-2.13.4.jar"/>
        <resource-root path="jackson-jakarta-rs-base-2.13.4.jar"/>
        <resource-root path="jackson-module-jakarta-xmlbind-annotations-2.13.4.jar"/>
    </resources>

    <dependencies>
        <module name="com.fasterxml.jackson.core.jackson-annotations"/>
        <module name="com.fasterxml.jackson.core.jackson-core"/>
        <module name="com.fasterxml.jackson.core.jackson-databind"/>
        <module name="jakarta.ws.rs.api"/>
        <module name="jakarta.xml.bind.api"/>
    </dependencies>
</module>

Hi, did you ever manage to solve this?