Dear all,
first of all - thanks for your effort for Keycloak – great product!
I’m trying to do a POC for the authorization API in Keycloak and therefore I downloaded from the project’s website the Demo distribution and tried to follow the readme instructions on the “photoz” example.
The import of the realm was successful, but when I tried to load the resource server configuration JSON I received the following exception in the log file:
Caused by: java.lang.ClassNotFoundException: org.apache.commons.codec.binary.Base64 from
[Module "org.drools:main" from local module loader @1476ceae (finder: local module finder @1b4febf3 (
roots: D:\dev\software\keycloak\keycloak-demo-2.1.0.Final\keycloak\modules,
D:\dev\software\keycloak\keycloak-demo-2.1.0.Final\keycloak\modules\system\layers\keycloak,
D:\dev\software\keycloak\keycloak-demo-2.1.0.Final\keycloak\modules\system\layers\base
))]
I was able to fix this issue by providing the following dependency entry in the drools module description for the commons-codec module at <KEYCLOAK_ROOT>\keycloak\modules\system\add-ons\keycloak\org\drools\main\module.xml
After this I could successfully import the “photoz-restful-api-authz-service.json” finally.
<dependencies>
<module name="javax.api"/>
<module name="javax.inject.api"/>
<module name="javax.enterprise.api"/>
<module name="org.slf4j"/>
<module name="org.apache.commons.codec"/><!-- this one is missing -->
<module name="org.apache.commons.logging"/>
<module name="org.keycloak.keycloak-core"/>
<module name="org.keycloak.keycloak-common"/>
<module name="org.keycloak.keycloak-server-spi"/>
</dependencies>
I also found a related JIRA “
KEYCLOAK-3279 Possible error with Drools policies when running on Windows” entry but this was closed without code fix, I think.
Can you verify this finding?
Thanks,
Christian