You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Configuration of custom JDBC driver is broken (leads to Azure SQL cannot be used as database) #9133
Configuration of custom JDBC driver is broken (leads to Azure SQL cannot be used as database)
In previous versions of keycloak.x it was possible to configure the JDBC driver by settings the environment variable KC_DB_DRIVER .
This is e.g. required to run keycloak.x in Azure using Azure SQL (see also disussion on dev mailing list).
With keycloak.x 15.1.0 this does no longer work - the database driver is now set based on the db settings to a hard coded driver class.
In case of mssql this uses a driver that uses XA transactions which are not supported by Azure SQL.
When trying to set the jdbc driver via configuration, keycloak uses the H2 database driver always.
@ioemat fyi, this behaviour will change in the next version / has changed now in latest main, see PR #10378 . you'll only need to run kc.sh build --db=mssql --transaction-xa-enabled=false, no System Properties or manually setting the driver involved anymore.
Activity
pedroigor commentedon Dec 15, 2021
@ioemat Not intended but we also did not yet stress the use case for databases other than those we support.
Looks like we have here a good opportunity to make the necessary changes to make this fully supported and covered.
pedroigor commentedon Dec 16, 2021
@ioemat I've created #9199. Kept the same tests only changed the implementation a bit.
Please, let me know if that PR solves the problem for you.
6 remaining items
[fixes keycloak#9133] - Allow setting JDBC driver and transaction type
[fixes #9133] - Allow setting JDBC driver and transaction type
DGuhr commentedon Feb 23, 2022
@ioemat fyi, this behaviour will change in the next version / has changed now in latest main, see PR #10378 . you'll only need to run
kc.sh build --db=mssql --transaction-xa-enabled=false, no System Properties or manually setting the driver involved anymore.