[keycloak-user] Minimal complete example

Sebastien Blanc sblanc at redhat.com
Tue Dec 13 06:12:43 EST 2016


But have you downloaded the districution zip that contains a wildfly server
that contains the keycloak server overlay and the adapters already
configured ?
Just go to keycloak-examples-2.4.0.Final/keycloak , run './standalone.xml'
and you have a 2 in 1 :) , you can deploy directly there your examples,
nothing else is needed.


On Tue, Dec 13, 2016 at 11:53 AM, Aidan Delaney <
aidan at ontologyengineering.org> wrote:

> Sebastien,
>
> You're right.  It doesn't have to be an EAR.  What I'm looking to have
> is the right demo workflow.
>
> For example, if you
>
> $ cd keycloak-examples-2.4.0.Final/preconfigured-demo
> $ mvn wildfly:run
>
> you get a
>
> ```
> org.jboss.msc.service.StartException in service
> jboss.undertow.deployment.default-server.default-host./customer-
> portal:
> java.lang.RuntimeException: java.lang.RuntimeException: UT010039:
> Unknown authentication mechanism KEYCLOAK
> ```
>
> which is because the wildfly keycloak adaptor isn't available
>
> Adding
>
> ```xml
> <dependency>
>   <groupId>org.keycloak</groupId>
>   <artifactId>keycloak-wildfly-adapter</artifactId>
>   <version>2.4.0.Final</version>
> </dependency>
> ```
> to the client-app `pom.xml` leads to a
>
> ```
> 10:45:16,948 ERROR [org.jboss.msc.service.fail] (ServerService Thread
> Pool -- 21) MSC000001: Failed to start service
> jboss.undertow.deployment.default-server.default-host./customer-
> portal:
> org.jboss.msc.service.StartException in service
> jboss.undertow.deployment.default-server.default-host./customer-
> portal:
> java.lang.NoClassDefFoundError:
> org/keycloak/adapters/KeycloakDeploymentBuilder
>         at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.r
> un(UndertowDeploymentService.java:85)
>         ...
> ```
>
> which I can then get from somewhere else....I'll chase it eventually.
>
> What I'm trying to do is have an example that pulls down all it's own
> dependencies so that students don't have to get the keycloak-overlay or
>  do anything other than have Maven available to them.
>
> Again, I appreciate that this isn't how you'd normally go about running
> Keycloak and I appreciate your help with this.
>
> --
> Dr Aidan Delaney
> Principal Lecturer
> Computing, Engineering & Maths
> University of Brighton
>
> @aidandelaney
>


More information about the keycloak-user mailing list