question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrade from 19.0.3-legacy to 20.0.1 with Oracle 11g

See original GitHub issue

Area

storage

Describe the bug

We are running Keycloak 19.0.3-legacy (WildFly) with Oracle 11g (11.2.0.4) and trying to upgrade to Keycloak 20.0.1 (Quarkus).

The Keycloak 20.0.1 crashes on start with:

[org.hibernate.SQL] (main) select migrationm0_.ID as id1_39_, migrationm0_.UPDATE_TIME as update_time2_39_, migrationm0_.VERSION as version3_39_ from MIGRATION_MODEL migrationm0_ order by migrationm0_.UPDATE_TIME DESC fetch first ? rows only
 2022-11-11 11:21:54,728 DEBUG [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (main) could not extract ResultSet [n/a]: java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended
...
 Caused by: Error : 933, Position : 191, Sql = select migrationm0_.ID as id1_39_, migrationm0_.UPDATE_TIME as update_time2_39_, migrationm0_.VERSION as version3_39_ from MIGRATION_MODEL migrationm0_ order by migrationm0_.UPDATE_TIME DESC fetch first :1  rows only, OriginalSql = select migrationm0_.ID as id1_39_, migrationm0_.UPDATE_TIME as update_time2_39_, migrationm0_.VERSION as version3_39_ from MIGRATION_MODEL migrationm0_ order by migrationm0_.UPDATE_TIME DESC fetch first ? rows only, Error Msg = ORA-00933: SQL command not properly ended

 	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498)
 	... 74 more

 2022-11-11 11:21:54,731 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (main) SQL Error: 933, SQLState: 42000
 2022-11-11 11:21:54,731 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (main) ORA-00933: SQL command not properly ended

Looks like according to the https://www.keycloak.org/server/db Oracle 11g is not supported anymore?

We tried setting the Hibernate ORM dialect to

quarkus.hibernate-orm.dialect=org.hibernate.dialect.Oracle10gDialect

without any success.

We also tried adding our ojdbc.jar to the custom built Docker container and running kc.sh build with quarkus.properties similar to

quarkus.datasource.db-kind=other
quarkus.datasource.jdbc.driver=oracle.jdbc.driver.OracleDriver
quarkus.datasource.jdbc.url=jdbc:oracle:thin:@192.168.1.12:1521/ORCL_SVC
quarkus.datasource.username=scott
quarkus.datasource.password=tiger

https://quarkus.io/guides/datasource#other-databases

also without any success.

Is there a way to run Keycloak 20.0.1 with Oracle 11g or are we stuck on Keycloak 19.0.3-legacy now? (Upgrading Oracle is sadly not an option for us.)

Version

20.0.1

Expected behavior

Keycloak 20.0.1 runs with Oracle 11g

Actual behavior

Keycloak 20.0.1 crashes

How to Reproduce?

Run Keycloak 20.0.1 with Oracle 11g.

Anything else?

Maybe related #10749

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
trailhuntervodafonecommented, Nov 25, 2022

@pedroigor : Thank you for your answer. Here https://www.keycloak.org/2022/02/dbs.html i read: “As such we are not currently planning on offering any second class databases long term, and rather phase out support for MySQL, MariaDB, SQL Server, and Oracle over time.” what does mean long term, how long "second class databases " will be supported?

1reaction
wkrusecommented, Nov 25, 2022

@trailhuntervodafone Thank you for the hint! I can confirm, that kc.sh start -Dkc.db-dialect=org.hibernate.dialect.Oracle10gDialect works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Oracle Database Releases That Support Direct Upgrade
Review the supported options for direct upgrades to the latest Oracle Database release.
Read more >
3 Upgrading to the New Release of Oracle Database
This chapter discusses important information and requirements and guides you through the process of upgrading a database to Oracle Database 11g Release 2...
Read more >
Upgrade and Migrate to Oracle Database 19c
This document provides an overview of upgrade and migration methods available for Oracle. Database 19c. It is intended solely to help you assess...
Read more >
Database Upgrade Guide - Oracle Help Center
About Upgrading Oracle OLAP Data Security Policies. 1-19 ... 4-11. Manually Upgrading a Multitenant Container Oracle Database (CDB). 4-11.
Read more >
2.1 Compatibility, Upgrading, Downgrading, and Installation
This section describes compatibility, upgrading, downgrading, and installation topics for Oracle Database 19c.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found