[keycloak-user] Using java admin client with Wildfly
valsaraj pv
valsarajpv at gmail.com
Thu Jun 14 06:02:19 EDT 2018
Here is what I did to solve issue. May be helpful for you.
Created keycloak-admin-client module for my application on WildFly to call
KC admin APIs.
> <module xmlns="urn:jboss:module:1.3"
> name="com.app.library.keycloak.keycloak-admin-client">
> <resources>
> <resource-root path="keycloak-admin-client-3.4.3.Final.jar"/>
> </resources>
> <dependencies>
> <module name="org.keycloak.keycloak-common" />
> <module name="org.keycloak.keycloak-core"/>
> <module name="org.jboss.resteasy.resteasy-jaxrs"/>
> <module name="javax.ws.rs.api"/>
> <module name="javax.api"/>
> </dependencies>
> </module>
Added dependency in jboss-deployment-structure.xml:
> <sub-deployment name="appEJB.jar">
> <dependencies>
> ....
> <module name="org.apache.httpcomponents"/>
> <module name="org.keycloak.keycloak-adapter-spi"/>
> <module name="org.keycloak.keycloak-adapter-core"/>
> <module name="org.keycloak.keycloak-common"/>
> <module name="org.keycloak.keycloak-core"/>
> <module name="com.ltchie.library.keycloak.keycloak-admin-client"/>
> </dependencies>
> </sub-deployment>
On Mon, Jun 11, 2018 at 6:00 PM, Pedro Pedro <sinsn_619 at abv.bg> wrote:
>
> I added jboss-deployment-structure but still getting the same exception.
> Here is the content of it:
>
>
> <jboss-deployment-structure>
> <deployment>
> <dependencies>
> <module name="org.jboss.resteasy.resteasy-jaxrs"/>
> <module name="org.jboss.resteasy.resteasy-jackson2-provider"/>
> <module name="org.jboss.resteasy.resteasy-multipart-provider"/>
> </dependencies>
> </deployment>
> </jboss-deployment-structure>
>
>
>
> Am I missing something?
>
>
> >-------- Оригинално писмо --------
> >От: valsaraj pv valsarajpv at gmail.com
> >Относно: Re: [keycloak-user] Using java admin client with Wildfly
> >До: Pedro Pedro <sinsn_619 at abv.bg>
> >Изпратено на: 11.06.2018 05:04
>
> I faced issues like this and resolved by setting resteasy wildfly module
> dependency.
>
> On Mon 11 Jun, 2018, 4:40 AM Pedro Pedro, < sinsn_619 at abv.bg> wrote:
>
>
>
>
> Hi all,
>
>
>
>
> I am trying to use the admin client in maven project, but on startup
> fails with this:
>
>
>
>
>
>
> Caused by: java.lang.RuntimeException: Could not find constructor for
> class: org.keycloak.admin.client.resource.ServerInfoResource
> at org.jboss.resteasy.spi.metadata.ResourceBuilder.
> constructor(ResourceBuilder.java:683) at
> org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory.
> registered(POJOResourceFactory.java:41) at org.jboss.resteasy.core.
> ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:207)
> at org.jboss.resteasy.core.ResourceMethodRegistry.
> addResourceFactory(ResourceMethodRegistry.java:193) at
> org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(
> ResourceMethodRegistry.java:179) at org.jboss.resteasy.core.
> ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:156)
> at org.jboss.resteasy.core.ResourceMethodRegistry.
> addPerRequestResource(ResourceMethodRegistry.java:75) at
> org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:400)
> at org.jboss.restea
> sy.spi.ResteasyDeployment.start(ResteasyDeployment.java:241)
>
>
> Any ideas about this?
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
>
--
Life is like this: "Just when we get all the answers of life.... God
changes the question paper....
Valsaraj Viswanathan
More information about the keycloak-user
mailing list