4

I am using hibernate 4.3.x to connect to oracle database.

However while creating mapping file it throws

"Unable to determine Dialect to use [ name = Oracle , majorVersion = 12 ]..."

which should be problem ( according to google ) in hiberante 3.x

How can i fix this? Thanks

//edit

Config properties:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
  <session-factory>
    <property name="hibernate.connection.driver_class">oracle.jdbc.OracleDriver</property>
    <property name="hibernate.connection.url">jdbc:oracle:...</property>
    <property name="hibernate.connection.username">name</property>
    <property name="hibernate.connection.password">Passwd</property>
    <mapping class="Nemocnica" package="Model"/>
  </session-factory>
</hibernate-configuration>
0

1 Answer 1

3

It seems that there is an issue with hibernate detecting Oracle 12 dialect.

Use:

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

Oracle 10 dialect should work with Oracle 12 also.

Sign up to request clarification or add additional context in comments.

3 Comments

i added it to the config and error remains the same
Can you post your code files, I'll see if I can replicate the problem on my system.
Fixed the error , i had typo in the code u wrote, it works now thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.