Using Keycloak.X 19 in docker how to setup embedded Infinispan with JDBC store?

385 views
Skip to first unread message

Matthieu Ghilain

unread,
Sep 16, 2022, 9:09:34 AM9/16/22
to Keycloak Dev
Hi guys,

I have also started a discussion on GitHub (https://github.com/keycloak/keycloak/discussions/14460) and I don't know which is the preferred canal.

I am trying to configure this in Keycloak cache configuration:

<string-keyed-jdbc-store xmlns="urn:infinispan:config:store:jdbc:13.0" dialect="POSTGRES">
<connection-pool connection-url="jdbc:postgresql://localhost/keycloak"
username="keycloak"
password="password"
driver="com.mysql.jdbc.Driver"/>
<string-keyed-table create-on-start="true" prefix="ISPN_STRING_TABLE">
<id-column name="ID_COLUMN"
type="VARCHAR(255)" />
<data-column name="DATA_COLUMN"
type="BINARY" />
<timestamp-column name="TIMESTAMP_COLUMN"
type="BIGINT" />
<segment-column name="SEGMENT_COLUMN"
type="INT"/>
</string-keyed-table>
</string-keyed-jdbc-store>

And I get the following error when starting Keycloak:

keycloak_1 | 2022-09-16 12:53:36,135 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: org.infinispan.commons.CacheConfigurationException: ISPN000327: Cannot find a parser for element 'string-keyed-jdbc-store' in namespace 'urn:infinispan:config:store:jdbc:13.0'. Check that your configuration is up-to date for Infinispan '13.0.9.Final' and if you have the proper dependency in the classpath
keycloak_1 | 2022-09-16 12:53:36,135 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: ISPN000327: Cannot find a parser for element 'string-keyed-jdbc-store' in namespace 'urn:infinispan:config:store:jdbc:13.0'. Check that your configuration is up-to date for Infinispan '13.0.9.Final' and if you have the proper dependency in the classpath

How am I supposed to add the necessary dependency to the Keycloak classpath? I tried copying the lib to the container but that does not work:

COPY infinispan-cachestore-jdbc-13.0.8.Final.jar /opt/keycloak/lib/lib/main

Any guidance (or example, or anything) on this would be really appreciated.

Reply all
Reply to author
Forward
0 new messages