ivangfr / keycloak-clustered

Keycloak-Clustered extends quay.io/keycloak/keycloak official Keycloak Docker image by adding JDBC_PING discovery protocol.
162 stars 57 forks source link

FIX for ERROR [org.jgroups.protocols.JDBC_PING] (keycloak-cache-init) JGRP000128: Error clearing table: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'JGROUPSPING' ] #26

Closed stecullum closed 6 months ago

stecullum commented 6 months ago

I had exactly the same error in the postgres driver..when using my own schema To fix I had to add the clear_sql statement

      <JDBC_PING connection_driver="org.postgresql.Driver"
              clear_sql="DELETE FROM ${env.KC_DB_SCHEMA:public}.JGROUPSPING WHERE cluster_name=?"
        />

http://www.jgroups.org/schema/jgroups-5.2.xsd

ivangfr commented 6 months ago

Thanks @stecullum! I will update the version 23.x cache-ispn-jdbc-ping.xml files!

ivangfr commented 6 months ago

Now, there is another exception when using MSSQL. I've updated the README with the exception. But, the

Error clearing table: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'JGROUPSPING' ]

was by-passed with your finding. Thanks again!