Hibernate Dialect for Oracle 19
Asked Answered
C

2

23

One of our database was upgraded to Oracle 19c and now my application is unable to connect to database

I am getting the following error.

HHH000400: Using dialect: org.hibernate.dialect.Oracle12cDialect
HHH000342: Could not obtain connection to query metadata : Unable to determine Dialect to use [name=Oracle, majorVersion=19]; user must register resolver or explicitly set 'hibernate.dialect'

I searched for dialect for oracle 19 but could't find any .

Is there is a dialect available for oracle 19 ?

Condonation answered 29/8, 2019 at 17:14 Comment(0)
S
22

There isn't a newer dialect than 12c, and it would be fine to use it with 19c, but there was a bug in hibernate-orm that prevents the auto detection to work, see:

https://hibernate.atlassian.net/browse/HHH-13184

https://hibernate.atlassian.net/browse/HHH-13609

It is already solved in the newer 5.4 releases, and I opened a PR for the 5.3 branch.

A workaround for now is to manually set the dialect property hibernate.dialect to org.hibernate.dialect.Oracle12cDialect.

Shannanshannen answered 2/9, 2019 at 13:12 Comment(2)
The property is already set to use Oracle12cDialect. The version I didn't checked. I believe I am using 5.3 and will give a try with 5.4Condonation
Oracle12cDialect is deprecated in Hibernate 6, I get the following error message when using it: "WARN [org.hibernate.orm.deprecation] (ServerService Thread Pool -- 84) HHH90000026: Oracle12cDialect has been deprecated; use org.hibernate.dialect.OracleDialect instead". When I use OracleDialect instead, I get "HHH000064: The OracleDialect dialect has been deprecated" instead :sLinden
D
16

Note that autodetection has changed in Hibernate 6, see the migration guide.

As a result, version-specific dialects (e.g. org.hibernate.dialect.Oracle12cDialect) should no longer be used. Use this dialect org.hibernate.dialect.OracleDialect instead, and ignore its deprecated subclasses:

Discompose answered 13/4, 2023 at 5:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.