[keycloak-user] Keycloak wf8 adapter 2.0.0.Final and authz

Christian Froehlich christian.froehlich at agfa.com
Fri Jul 15 03:26:33 EDT 2016


Hi,

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?
Here the stacktrace of my deployment error:
[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
        at 
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) 
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
[rt.jar:1.8.0_92]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
[rt.jar:1.8.0_92]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_92]
 Caused by: java.lang.NoClassDefFoundError: 
org/keycloak/authorization/client/Configuration
        at 
org.keycloak.adapters.authorization.PolicyEnforcer.<init>(PolicyEnforcer.java:56)
        at 
org.keycloak.adapters.KeycloakDeploymentBuilder.internalBuild(KeycloakDeploymentBuilder.java:118)
        at 
org.keycloak.adapters.KeycloakDeploymentBuilder.build(KeycloakDeploymentBuilder.java:127)
        at 
org.keycloak.adapters.undertow.KeycloakServletExtension.handleDeployment(KeycloakServletExtension.java:135)
        at 
io.undertow.servlet.core.DeploymentManagerImpl.handleExtensions(DeploymentManagerImpl.java:244)
        at 
io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:149)
        at 
org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)
        at 
org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)
        at 
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) 
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]
        at 
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) 
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]
        ... 3 more
 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))]
        at 
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) 
[jboss-modules.jar:1.3.3.Final]
        at 
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) 
[jboss-modules.jar:1.3.3.Final]
        at 
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) 
[jboss-modules.jar:1.3.3.Final]
        at 
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) 
[jboss-modules.jar:1.3.3.Final]
        at 
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) 
[jboss-modules.jar:1.3.3.Final]
        ... 13 more
 
[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
     Caused by: java.lang.NoClassDefFoundError: 
org/keycloak/authorization/client/Configuration
     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))]"}}
 [0m06:40:50,780 INFO 
[org.hibernate.hql.internal.QueryTranslatorFactoryInitiator] 
(ServerService Thread Pool -- 49) HHH000397: Using 
ASTQueryTranslatorFactory
 [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")
 [0m2016-07-15 06:40:50,870 INFO  [org.jboss.as.controller] (Controller 
Boot Thread) () JBAS014774: Service status report
 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

Regards Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160715/4cc94476/attachment.html 


More information about the keycloak-user mailing list