<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_1_1447762848817_2271">hi to all,</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr">i'm facing up to a class loading issue after i migrated from keycloak 1.5.0 final to keycloak 1.6.1 final.</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr">My application server is jboss WF9.</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr">Specifically i developed my multitenant module following your example.</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr">On Keycloak 1.5.0 adapter i saw that interface </div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr"><br></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr">org.keycloak.adapters.spi.HttpFacade</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr"><br></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr">was in the keycloak-adapter-core dependency while in the 1.6.1 it was moved into keycloak-adapter-spi.</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr"><br></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr">I've referenced these depencencies as provided scoped in my project pom (as showed in the example too):</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr"><br></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr"> <dependency></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><span class="" style="white-space:pre-wrap;" id="yui_3_16_0_1_1447762848817_2551">                </span><groupId>org.keycloak</groupId></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><span class="" style="white-space:pre-wrap;" id="yui_3_16_0_1_1447762848817_2554">                </span><artifactId>keycloak-adapter-core</artifactId></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><span class="" style="white-space:pre-wrap;" id="yui_3_16_0_1_1447762848817_2557">                </span><version>1.6.1.Final</version></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><span class="" style="white-space:pre-wrap;" id="yui_3_16_0_1_1447762848817_2560">                </span><scope>provided</scope></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><span class="" style="white-space:pre-wrap;" id="yui_3_16_0_1_1447762848817_2563">                </span></dependency><span class="" style="white-space:pre-wrap;" id="yui_3_16_0_1_1447762848817_2565">        </span> </div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> <dependency></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> <groupId>org.keycloak</groupId></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> <artifactId>keycloak-adapter-spi</artifactId></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> <version>1.6.1.Final</version></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> <scope>provided</scope></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> </dependency></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class="">I have installed the wf9 adapter adding:</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><extensions></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> <extension module="org.keycloak.keycloak-adapter-subsystem"/></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> ...</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""></extensions></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class="">... </div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><profile></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> <subsystem xmlns="urn:jboss:domain:keycloak:1.1"/></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> ...</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""></profile></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class="">and </div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><server xmlns="urn:jboss:domain:1.4"></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> <subsystem xmlns="urn:jboss:domain:security:1.2"></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> <security-domains></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> ...</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> <security-domain name="keycloak"></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> <authentication></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> <login-module code="org.keycloak.adapters.jboss.KeycloakLoginModule" flag="required"/></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> </authentication></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> </security-domain></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""></security-domains></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class="">and eventually by copying the modules folder into the wf9 modules directory.</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class="">When i deploy my</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class="">org.keycloak.adapters.KeycloakConfigResolver<br></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class="">implementation i get this error:</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> ...]</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class="">13:02:55,997 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.unit."myapp.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myapp.war".POST_MODU</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class="">LE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "myapp.war"</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:163)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at java.lang.Thread.run(Thread.java:745)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class="">Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class multitenancy.keycloak.PathBasedKeycloakConfigResolver with ClassLoader ModuleClassLoader for Module "deployment.myapp.war:main" fro</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class="">m Service Module Loader</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:57)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:107)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:92)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:156)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> ... 5 more</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class="">Caused by: java.lang.NoClassDefFoundError: org/keycloak/adapters/spi/HttpFacade$Request</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at java.lang.Class.getDeclaredMethods0(Native Method)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at java.lang.Class.getDeclaredMethods(Class.java:1975)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:65)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> ... 10 more</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class="">Caused by: java.lang.ClassNotFoundException: org.keycloak.adapters.spi.HttpFacade$Request from [Module "deployment.myapp.war:main" from Service Module Loader]</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:130)</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""> ... 15 more</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class="">Why the keycloak-adapter-spi-1.6.1.Final.jar is not loaded by keycloak-adapter-spi module?</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class="">If i decide to include the jar inside the myapp.war archive...after deployment i get a Linkage exception error.</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class="">What am i doing wrong?</div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1447762848817_2271" dir="ltr" class="">thanks</div></div></body></html>