asd123ea
asd123ea

Reputation: 131

Not able to deploy keyclock quickstart example war in wildfly

I can't reproduce the tutorial to deploy this application on wildfly.

I downloaded the wildfly and started wildfly-19.1.0.Final/bin/standalone.sh

And when I execute from project directory mvn clean wildfly:deploy I get this error

15:12:55,016 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.module.service."deployment.app-authz-jee-vanilla.war".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.app-authz-jee-vanilla.war".main: WFLYSRV0179: Failed to load module: deployment.app-authz-jee-vanilla.war
    at [email protected]//org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:116)
    at [email protected]//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
    at [email protected]//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
    at [email protected]//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
    at [email protected]//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at [email protected]//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
    at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: org.jboss.modules.ModuleNotFoundException: org.keycloak.keycloak-authz-client
    at org.jboss.modules.Module.addPaths(Module.java:1266)
    at org.jboss.modules.Module.link(Module.java:1622)
    at org.jboss.modules.Module.relinkIfNecessary(Module.java:1650)
    at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:299)
    at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:283)
    at [email protected]//org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:93)
    ... 8 more

15:12:55,021 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "app-authz-jee-vanilla.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.module.service.\"deployment.app-authz-jee-vanilla.war\".main" => "WFLYSRV0179: Failed to load module: deployment.app-authz-jee-vanilla.war
    Caused by: org.jboss.modules.ModuleNotFoundException: org.keycloak.keycloak-authz-client"}}
15:12:55,022 ERROR [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0021: Deploy of deployment "app-authz-jee-vanilla.war" was rolled back with the following failure message: 
{"WFLYCTL0080: Failed services" => {"jboss.module.service.\"deployment.app-authz-jee-vanilla.war\".main" => "WFLYSRV0179: Failed to load module: deployment.app-authz-jee-vanilla.war
    Caused by: org.jboss.modules.ModuleNotFoundException: org.keycloak.keycloak-authz-client"}}
15:12:55,034 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0028: Stopped deployment app-authz-jee-vanilla.war (runtime-name: app-authz-jee-vanilla.war) in 11ms

I tried running on docker wildfly and other example applications and worked. I don't have any experience in java. What can I do to have this app up and running?

Upvotes: 1

Views: 2462

Answers (2)

Charles Tempo
Charles Tempo

Reputation: 576

In my case, the WildFly not started 100% successfully. In the 'standalone.xml' file's end, there are some ports which maybe not available to you. Check for the logs, disable/move conflicting ports.

Upvotes: 0

Chamil
Chamil

Reputation: 803

With the command wildfly-19.1.0.Final/bin/standalone.sh, you are running keycloak on Wildfly.

Please use a different Wildfly server to host your servlet application. To communicate with the Keycloak running on the other server, you need "Keycloak OpenID Connect Client Adapter" installed into your Wildfly server which runs the servlet application.

You may use this guide to install the keycloak adapter into the wildly server. After you install this adapter into the new Wildfly, org.keycloak.keycloak-authz-client module will be available on this Wildfly.

However still there is a blocker for the latest java version [above java 11].

Upvotes: 1

Related Questions