Javi
Javi

Reputation: 41

Error: "reading schema error: error calling driver#connect" when configuring Table filters in the Hibernate Reverse Engineering File (reveng.xml)

I am having some problems trying to configure Hibernate in my Java Project. I was looking around the forum, but I could not find any solution. I am new to Hibernate, Could you please help me? Thanks in advance.

Here is my hibernate.cfg.xml file content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                                     "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory name="ConexionHibernate">
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.password">hr</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:1521/xe</property>
<property name="hibernate.connection.username">hr</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
</session-factory>
</hibernate-configuration>

This is how my DataBase Connection looks like in Oracle SQL Developer

This is the error itself when i try configure the tables.

Upvotes: 0

Views: 1775

Answers (1)

KlajdPaja
KlajdPaja

Reputation: 959

In your config jdbc driver is set for mysql and also the connection url is not correct, for oracle it's:

<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:xe</property>

Upvotes: 1

Related Questions