<font size=2 face="sans-serif">Hi,</font>
<br>
<br><font size=2 face="sans-serif">I got a NoClassDefFoundError when I
try to use the Authorization provided by keycloak. My Application is running
on a wildfly 8 including the coresponding wf8 adapter. Keycloak itself
is runing as a standalone server. The module "keycloak-authz-client"
is missing in wf8 adapter when I compare the adapter of wildfly 9/10 and
wildfly 8. Is it a bug or is it not possible to use the authorization within
a wildfly 8?</font>
<br><font size=2 face="sans-serif">Here the stacktrace of my deployment
error:</font>
<br><font size=2 face="sans-serif">[31m2016-07-15 06:40:50,714 ERROR [org.jboss.msc.service.fail]
(MSC service thread 1-3) () MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./orbis-4u:
org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./orbis-4u:
Failed to start service</font>
<br><font size=2 face="sans-serif"> at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]</font>
<br><font size=2 face="sans-serif"> at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[rt.jar:1.8.0_92]</font>
<br><font size=2 face="sans-serif"> at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[rt.jar:1.8.0_92]</font>
<br><font size=2 face="sans-serif"> at
java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_92]</font>
<br><font size=2 face="sans-serif"> Caused by: java.lang.NoClassDefFoundError:
org/keycloak/authorization/client/Configuration</font>
<br><font size=2 face="sans-serif"> at
org.keycloak.adapters.authorization.PolicyEnforcer.<init>(PolicyEnforcer.java:56)</font>
<br><font size=2 face="sans-serif"> at
org.keycloak.adapters.KeycloakDeploymentBuilder.internalBuild(KeycloakDeploymentBuilder.java:118)</font>
<br><font size=2 face="sans-serif"> at
org.keycloak.adapters.KeycloakDeploymentBuilder.build(KeycloakDeploymentBuilder.java:127)</font>
<br><font size=2 face="sans-serif"> at
org.keycloak.adapters.undertow.KeycloakServletExtension.handleDeployment(KeycloakServletExtension.java:135)</font>
<br><font size=2 face="sans-serif"> at
io.undertow.servlet.core.DeploymentManagerImpl.handleExtensions(DeploymentManagerImpl.java:244)</font>
<br><font size=2 face="sans-serif"> at
io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:149)</font>
<br><font size=2 face="sans-serif"> at
org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)</font>
<br><font size=2 face="sans-serif"> at
org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)</font>
<br><font size=2 face="sans-serif"> at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]</font>
<br><font size=2 face="sans-serif"> at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]</font>
<br><font size=2 face="sans-serif"> ...
3 more</font>
<br><font size=2 face="sans-serif"> Caused by: java.lang.ClassNotFoundException:
org.keycloak.authorization.client.Configuration from [Module "org.keycloak.keycloak-adapter-core:main"
from local module loader @3b94d659 (finder: local module finder @24b1d79b
(roots: /opt/orbis/oas/server/orbis-as-08.04.27.00.0015200-DACHL/modules,/opt/orbis/oas/server/orbis-as-08.04.27.00.0015200-DACHL/modules/system/layers/base,/opt/orbis/oas/server/orbis-as-08.04.27.00.0015200-DACHL/modules/system/add-ons/keycloak))]</font>
<br><font size=2 face="sans-serif"> at
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)
[jboss-modules.jar:1.3.3.Final]</font>
<br><font size=2 face="sans-serif"> at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459)
[jboss-modules.jar:1.3.3.Final]</font>
<br><font size=2 face="sans-serif"> at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408)
[jboss-modules.jar:1.3.3.Final]</font>
<br><font size=2 face="sans-serif"> at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389)
[jboss-modules.jar:1.3.3.Final]</font>
<br><font size=2 face="sans-serif"> at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)
[jboss-modules.jar:1.3.3.Final]</font>
<br><font size=2 face="sans-serif"> ...
13 more</font>
<br><font size=2 face="sans-serif"> </font>
<br><font size=2 face="sans-serif">[31m2016-07-15 06:40:50,744 ERROR [org.jboss.as.controller.management-operation]
(Controller Boot Thread) () JBAS014613: Operation ("deploy")
failed - address: ([("deployment" => "orbis-4u.war")])
- failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host./orbis-4u"
=> "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./orbis-4u:
Failed to start service</font>
<br><font size=2 face="sans-serif"> Caused by: java.lang.NoClassDefFoundError:
org/keycloak/authorization/client/Configuration</font>
<br><font size=2 face="sans-serif"> Caused by: java.lang.ClassNotFoundException:
org.keycloak.authorization.client.Configuration from [Module \"org.keycloak.keycloak-adapter-core:main\"
from local module loader @3b94d659 (finder: local module finder @24b1d79b
(roots: /opt/orbis/oas/server/orbis-as-08.04.27.00.0015200-DACHL/modules,/opt/orbis/oas/server/orbis-as-08.04.27.00.0015200-DACHL/modules/system/layers/base,/opt/orbis/oas/server/orbis-as-08.04.27.00.0015200-DACHL/modules/system/add-ons/keycloak))]"}}</font>
<br><font size=2 face="sans-serif"> [0m06:40:50,780 INFO [org.hibernate.hql.internal.QueryTranslatorFactoryInitiator]
(ServerService Thread Pool -- 49) HHH000397: Using ASTQueryTranslatorFactory</font>
<br><font size=2 face="sans-serif"> [0m2016-07-15 06:40:50,856 INFO
[org.jboss.as.server] (ServerService Thread Pool -- 33) () JBAS018559:
Deployed "orbis-4u.war" (runtime-name : "orbis-4u.war")</font>
<br><font size=2 face="sans-serif"> [0m2016-07-15 06:40:50,870 INFO
[org.jboss.as.controller] (Controller Boot Thread) () JBAS014774:
Service status report</font>
<br><font size=2 face="sans-serif"> JBAS014777: Services which
failed to start: service jboss.undertow.deployment.default-server.default-host./orbis-4u:
org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./orbis-4u:
Failed to start service</font>
<br>
<br><font size=2 face="sans-serif">Regards Christian</font>