hamed
hamed

Reputation: 8033

hibernate dialect for oracle 12c

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.

Upvotes: 17

Views: 99399

Answers (3)

(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>

Upvotes: 0

Darshna
Darshna

Reputation: 201

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

Upvotes: 17

wjans
wjans

Reputation: 10115

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.

Upvotes: 13

Related Questions