<div dir="ltr">Looks like you&#39;ve mixed the instructions. If you copy the jar to providers directory you don&#39;t need to register the module, that&#39;s only when you&#39;re deploying as a module.</div><div class="gmail_extra"><br><div class="gmail_quote">On 25 May 2016 at 09:23, Sarp Kaya <span dir="ltr">&lt;<a href="mailto:akaya@expedia.com" target="_blank">akaya@expedia.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>Hello,</div>
<div><br>
</div>
<div>I have followed the instructions in the provided example (from keycloak-examples-1.9.4.Final.zip). The steps I have done are:</div>
<div><br>
</div>
<ol>
<li>ran mvn clean install</li><li>Copied event-listener-sysout-example.jar file from target to providers directory in keycloak</li><li>Registered provider in keycloak-server.json</li><li>Restarted the standalone server</li></ol>
<div>I am getting the error below now:</div>
<div><br>
</div>
<div>
<div>07:12:51,542 INFO  [org.keycloak.services] (ServerService Thread Pool -- 55) KC-SERVICES0001: Loading config from /opt/jboss/keycloak/standalone/configuration/keycloak-server.json</div>
<div>07:12:51,946 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 55) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./auth: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./auth:
 java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)</div>
<div>        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)</div>
<div>        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)</div>
<div>        at java.util.concurrent.FutureTask.run(FutureTask.java:266)</div>
<div>        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)</div>
<div>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)</div>
<div>        at java.lang.Thread.run(Thread.java:745)</div>
<div>        at org.jboss.threads.JBossThread.run(JBossThread.java:320)</div>
<div>Caused by: java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)</div>
<div>        at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:162)</div>
<div>        at org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2209)</div>
<div>        at org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:299)</div>
<div>        at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:240)</div>
<div>        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:113)</div>
<div>        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)</div>
<div>        at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)</div>
<div>        at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)</div>
<div>        at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)</div>
<div>        at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:231)</div>
<div>        at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:132)</div>
<div>        at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:526)</div>
<div>        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:101)</div>
<div>        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)</div>
<div>        ... 6 more</div>
<div>Caused by: java.lang.RuntimeException: org.jboss.modules.ModuleNotFoundException: org.keycloak.examples.event-sysout:main</div>
<div>        at org.keycloak.provider.wildfly.ModuleProviderLoaderFactory.create(ModuleProviderLoaderFactory.java:44)</div>
<div>        at org.keycloak.provider.ProviderManager.&lt;init&gt;(ProviderManager.java:56)</div>
<div>        at org.keycloak.services.DefaultKeycloakSessionFactory.init(DefaultKeycloakSessionFactory.java:71)</div>
<div>        at org.keycloak.services.resources.KeycloakApplication.createSessionFactory(KeycloakApplication.java:225)</div>
<div>        at org.keycloak.services.resources.KeycloakApplication.&lt;init&gt;(KeycloakApplication.java:77)</div>
<div>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)</div>
<div>        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)</div>
<div>        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)</div>
<div>        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)</div>
<div>        at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:150)</div>
<div>        ... 19 more</div>
<div>Caused by: org.jboss.modules.ModuleNotFoundException: org.keycloak.examples.event-sysout:main</div>
<div>        at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:223)</div>
<div>        at org.keycloak.provider.wildfly.ModuleProviderLoaderFactory.create(ModuleProviderLoaderFactory.java:40)</div>
<div>        ... 28 more</div>
<div><br>
</div>
<div>07:12:51,976 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation (&quot;add&quot;) failed - address: ([(&quot;deployment&quot; =&gt; &quot;keycloak-server.war&quot;)]) - failure description: {&quot;WFLYCTL0080: Failed services&quot; =&gt; {&quot;jboss.undertow.deployment.default-server.default-host./auth&quot;
 =&gt; &quot;org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./auth: java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)</div>
<div>    Caused by: java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)</div>
<div>    Caused by: java.lang.RuntimeException: org.jboss.modules.ModuleNotFoundException: org.keycloak.examples.event-sysout:main</div>
<div>    Caused by: org.jboss.modules.ModuleNotFoundException: org.keycloak.examples.event-sysout:main&quot;}}</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Am I missing an unknown step? The readme file only mentions copying the jar file to providers. If not what could be wrong?</div>
<div><br>
</div>
<div>Kind Regards,</div>
<div>Sarp Kaya</div>
</div>

<br>_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br></blockquote></div><br></div>