[keycloak-dev] RuntimeException: Cannot find KieModule on example authz/photoz

Pedro Igor psilva at redhat.com
Tue Nov 22 15:20:14 EST 2016


Good to know. Btw, we have changed the photoz example to update the policy artifact version during the build to avoid errors like this one.
On 11/22/2016 4:12:22 PM, Maurício Giacomini Penteado <mauriciogiacomini at hotmail.com> wrote:
Hello


I would like inform that my problem was in maven cache.
Deleting the folders photoz-authz-policy, photoz-html5-client and photoz-restful-api from $M2_HOME\repository\org\keycloak and executing the commands to rebuild using mvn with "-U" parameter all works fine. Ex:

cd keycloak/examples/authz/photoz/
mvn -U clean install

cd photoz-restful-api/
mvn -U clean package wildfly:deploy
cd ..

cd photoz-html5-client
mvn -U clean package wildfly:deploy

I would ask a correction in branch 2.3.x the file https://github.com/keycloak/keycloak/blob/2.3.x/examples/authz/photoz/photoz-restful-api-authz-service.json

The "Only Owner Policy" block is relationed with "mavenArtifactVersion": "2.1.0-SNAPSHOT". I think that it should be corrected to 2.3.0.Final version.

Regards,
Maurício.


________________________________
De: keycloak-dev-bounces at lists.jboss.org em nome de Maurício Giacomini Penteado
Enviado: segunda-feira, 21 de novembro de 2016 18:04
Para: keycloak-dev at lists.jboss.org
Assunto: [keycloak-dev] RuntimeException: Cannot find KieModule on example authz/photoz

Hello everybody

I am doing some tests of resources authorization in keycloak but I am having some problems.
If I try run authz/photoz example in a windows 7 station with wildfly 10 and Keycloak 2.3.0 all works fine.
But using windows 10 or ubuntu 16.04 stations I always receive "RuntimeException: Cannot find KieModule".
In all tests I did the same sequence described in https://github.com/keycloak/keycloak/tree/master/examples/authz/photoz/

I do not understanding why just on windows 7 station all works fine.
If someone can help me, please let me know.

Regards,
Mauricio.

*A complete stack of the error:

15:20:52,311 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 65) 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)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)
at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:162)
at org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2209)
at org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:299)
at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:240)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:113)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)
at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)
at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)
at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:231)
at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:132)
at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:526)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:101)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
... 6 more
Caused by: java.lang.RuntimeException: Cannot find KieModule: org.keycloak:photoz-authz-policy:2.1.0-SNAPSHOT
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:117)
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:111)
at org.keycloak.authorization.policy.provider.drools.DroolsPolicy.(DroolsPolicy.java:31)
at org.keycloak.authorization.policy.provider.drools.DroolsPolicyProviderFactory.update(DroolsPolicyProviderFactory.java:95)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at org.keycloak.authorization.policy.provider.drools.DroolsPolicyProviderFactory$1.onEvent(DroolsPolicyProviderFactory.java:75)
at org.keycloak.services.DefaultKeycloakSessionFactory.publish(DefaultKeycloakSessionFactory.java:67)
at org.keycloak.services.resources.KeycloakApplication.(KeycloakApplication.java:162)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:150)
... 19 more


_______________________________________________
keycloak-dev mailing list
keycloak-dev at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-dev
keycloak-dev Info Page - lists.jboss.org
lists.jboss.org
To see the collection of prior postings to the list, visit the keycloak-dev Archives. Using keycloak-dev: To post a message to all the list members ...



_______________________________________________
keycloak-dev mailing list
keycloak-dev at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-dev


More information about the keycloak-dev mailing list