5

We are upgrading oracle from 11g to 12c. My application is using hibernate3.jar which is 3.6.8-Final version. It works great with 11g using Oracle10gDialect but when I connect to 12c database I get below error. I also changed classes12.jar to ojdbc7.jar.

Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable to determine Dialect to use [name=Oracle, majorVersion=12]; user must register resolver or explicitly set 'hibernate.dialect'

I tried downgrading till 3.1.1 and upgrading till 3.6.10-Final. Below 3.6.8 my code wont compile as there is no Oracle10gDialect class before that. And even 3.6.10-final version gives me same above error. I cannot upgrade to Hibernate 4. Any advise will be of great help. thank you.

Josip Ivic
  • 3,639
  • 9
  • 39
  • 57
  • Did you find a solution? I have the same problem. I use spring too and running into many issues with Spring3+Hibernate-3 (or 4) for oracle 12c – suman j Dec 11 '17 at 16:00

1 Answers1

0

If I recall correctly, you need to explicitly declare what dialect to use. I think we did a JVM option -Dhibernate.dialect=org.hibernate.dialect.Oracle10gDialect or we added a configuration in domain.xml (if you're using Glassfish) hibernate.dialect=org.hibernate.dialect.Oracle10gDialect. Hope this helps.

jpllosa
  • 2,066
  • 1
  • 28
  • 30