Repository navigation
Update to KC26 , problems with setting oracle db version #35279
|
I'm trying to update Keycloak to version 26. It then suggests to set 'quarkus.datasource.db-version=18.0.0' in my quarkus.properties. After some further investigation and attaching the debugger I noticed that the config is loaded (the set value to 18.0.0 in the recordedConfig Object), but only the version that was set at build time is used (it defaults to 19.0.0). I experimented with the different Env-Variables of Quarkus and KC but couldn't get it work. Is it somehow possible to set the version for quarkus at build time with the Thank you for reading and if you need further details please let me know. |
Replies: 3 comments 2 replies
|
I have the same issue with Postgres. |
Unfortunately the underlying issue is this: quarkusio/quarkus#43216 Until we move away from having a persistence.xml in the distribution, you can't properly override the database version. The only suggested workaround on that issue is to modify the persistence.xml - you should be able to do that by putting an edited version of that in the appropriate package in a jar in the provider directory. |
Yes the file is called default-persistence.xml - https://raw.githubusercontent.com/keycloak/keycloak/refs/heads/main/model/jpa/src/main/resources/default-persistence.xml
The key should be jakarta.persistence.database-product-version
Put the updated file in at the root of a jar and put it in the providers diretory - it should be seen shadow the built-in one that way. If we stilll don't get around to pulling out this file, we may have to resort to supporting expressions in it, like shown here https://github.com/quarkusio/quarkus/pull/43240/files#diff-7934b0f96e42a3e76067eaddce2547cf00b4550d1f24e572a9510d017d76d480 |
Unfortunately the underlying issue is this: quarkusio/quarkus#43216
Until we move away from having a persistence.xml in the distribution, you can't properly override the database version.
The only suggested workaround on that issue is to modify the persistence.xml - you should be able to do that by putting an edited version of that in the appropriate package in a jar in the provider directory.