15

I'm using hibernate in my spring mvc project and I want to connect to oracle 12c database. I used org.hibernate.dialect.Oracle12cDialect, but, this returns me org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [org.hibernate.dialect.Oracle12cDialect] as strategy [org.hibernate.dialect.Dialect]. How can I set dialect for oracle 12c? I'm using hibernate 4.3.9.

hamed
  • 7,681
  • 13
  • 50
  • 104

3 Answers3

15

org.hibernate.dialect.Oracle12cDialect can be used with hibernate-core version 5.0

See: https://docs.jboss.org/hibernate/orm/5.0/javadocs/org/hibernate/dialect/Oracle12cDialect.html

bish
  • 3,241
  • 9
  • 46
  • 66
Darshna
  • 171
  • 1
  • 3
  • 1
    I think that more details will be good. Add some additional links to documentation and some explanations will be great also. – Spell Sep 06 '16 at 21:48
  • While link-only answers are generally against SO policy, this is a great concise answer – usr-local-ΕΨΗΕΛΩΝ Dec 18 '18 at 15:51
  • `org.hibernate.dialect.Oracle12cDialect` cannot be used below Hibernate 5.0. This class is absent from Hibernate 4.3 (previous release prior to 5.0) and lower as can be seen in the [4.3 javadoc](https://docs.jboss.org/hibernate/orm/4.3/javadocs/). – Pierre C Feb 11 '22 at 16:05
13

Try to use org.hibernate.dialect.Oracle10gDialect, seems to be the highest possible version in Hibernate 4.3.9.

A dialect for 12c seems to be present in later versions, see this.

wjans
  • 9,794
  • 5
  • 31
  • 39
0

(Maven) for:

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>5.4.9.Final</version>
    </dependency>

You might want to add this dialect:

<property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>