<div dir="ltr">Hi,<div><br></div><div>Thank you very much for your guide. I've tried to follow your step, but there is no luck. The stacktrace show me as</div><div><br></div><div>Caused by: java.lang.ClassNotFoundException: org.apache.commons.codec.binary.Base64 from </div><div>[Module "org.drools:main" from local module loader @33e5ccce (finder: local module finder @5a42bbf4 (</div><div><br></div><div>roots: C:\Java.Application\jboss\keycloak-2.0.0.Final\modules,</div><div>C:\Java.Application\jboss\keycloak-2.0.0.Final\modules\system\layers\keycloak,</div><div>C:\Java.Application\jboss\keycloak-2.0.0.Final\modules\system\layers\base</div><div><br></div><div>))]</div><div><br></div><div>Then I decided to copy the "commons-codec-1.10.jar" from "<span style="font-size:14px">modules/system/layers/base/</span><span style="font-size:14px">org/apache/commons/codec/main</span>" to "modules" directly. At the moment I can resolve that maven artifact for Drools. I'm not sure if it is a suitable way or not. Could you please help to advise how to put the dependency jars, e.g. the "commons-codec-1.10.jar", to the proper location?</div><div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><font face="Tahoma"><span style="font-size:10pt;font-family:Tahoma;color:rgb(153,102,51)"><font color="#000000">--</font></span></font></div><font face="Tahoma"><span style="font-size:10pt;font-family:Tahoma;color:rgb(153,102,51)"><font color="#000000"> Best Regards,<br><br>
                                                         Charlee Ch</font></span></font></div></div></div>
<br><div class="gmail_quote">2016-07-06 20:13 GMT+07:00 Pedro Igor Silva <span dir="ltr"><<a href="mailto:psilva@redhat.com" target="_blank">psilva@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Could not reproduce that issue in my environment. Here is what I did:<br>
<br>
- Download standalone server distribution [1]<br>
- Download examples [2]<br>
- Extract both server and examples<br>
- Build examples<br>
- Run server<br>
- Import keycloak-examples-2.0.0.Final/authz/photoz/photoz-realm.json<br>
- Create a Drools Policy just like you did after selecting the "photoz-restful-api" client application.<br>
<br>
Could you send the full stack trace ? Am I'm missing any step in order to reproduce this ?<br>
<br>
Btw, I have also tested using the demo distribution.<br>
<br>
Regards.<br>
Pedro Igor<br>
<br>
[1] <a href="https://downloads.jboss.org/keycloak/2.0.0.Final/keycloak-2.0.0.Final.zip" rel="noreferrer" target="_blank">https://downloads.jboss.org/keycloak/2.0.0.Final/keycloak-2.0.0.Final.zip</a><br>
[2] <a href="https://downloads.jboss.org/keycloak/2.0.0.Final/keycloak-examples-2.0.0.Final.zip" rel="noreferrer" target="_blank">https://downloads.jboss.org/keycloak/2.0.0.Final/keycloak-examples-2.0.0.Final.zip</a><br>
<div><div class="h5"><br>
----- Original Message -----<br>
From: "Charlee Chitsuk" <<a href="mailto:charlee.ch@gmail.com">charlee.ch@gmail.com</a>><br>
To: <a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
Sent: Wednesday, July 6, 2016 4:48:35 AM<br>
Subject: [keycloak-user] Cannot create Drolls policy.<br>
<br>
Hi,<br>
<br>
I'm using the keycloak version 2.0.0.Final with default standalone. I've build and install the maven artifact, the "org.keycloak:photoz-authz-policy:2.0.0.Final" and tried to create the Drools policy. as the following<br>
<br>
mavenArtifactGroupId = org.keycloak<br>
mavenArtifactId = photoz-authz-policy<br>
mavenArtifactVersion = 2.0.0.Final"<br>
<br>
<br>
<br>
When I click the "Resolve" button, the system shows me as "Error! An unexpected server error has occurred"<br>
<br>
The "standalone/log/server.log" also shows as<br>
<br>
[io.undertow.request] (default task-80) UT005023: Exception handling request to<br>
/auth/admin/realms/photoz/clients/001e0705-8bc6-47de-b408-dd07a5ebba9b/authz/resource-server/policy/drools/resolveModules:<br>
org.jboss.resteasy.spi.UnhandledException: java.lang.NoClassDefFoundError:<br>
org/apache/commons/codec/binary/Base64<br>
at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76)<br>
...<br>
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64<br>
at org.apache.http.impl.auth.BasicScheme.authenticate(BasicScheme.java:168)<br>
<br>
I can ensure that<br>
<br>
1. The "commons-codec-1.10.jar" is existed at "modules/system/layers/base/org/apache/commons/codec/main"<br>
<br>
2. The "org.keycloak:photoz-authz-policy:2.0.0.Final" is existed at my local repository at<br>
"some/drive/m2/repo/org/keycloak/photoz-authz-policy/2.0.0.Final/photoz-authz-policy-2.0.0.Final.jar".<br>
<br>
Could you please help to advise further?<br>
<br>
--<br>
Best Regards,<br>
<br>
Charlee Ch<br>
<br>
</div></div>_______________________________________________<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></div></div>