hibernate 2.1.2
I had the following configuration file ...
Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- datasource connection properties -->
<property name="hibernate.dialect">net.sf.hibernate.dialect.Oracle9Dialect</property>
<property name="hibernate.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@...</property>
<property name="hibernate.connection.username">username</property>
<property name="hibernate.connection.password">secret</property>
<!-- dialect for Oracle 9 -->
<property name="hibernate.show_sql">true</property>
<property name="use_outer_join">true</property>
<!-- property name="hibernate.use_outer_join">true</property -->
<mapping resource="Organisation.hbm.xml"/>
<mapping resource="Budget.hbm.xml"/>
<mapping resource="CostElements.hbm.xml"/>
</session-factory>
</hibernate-configuration>
The error I was getting is ...
[DEBUG] DriverManagerConnectionProvider - -opening new JDBC connection
[WARN] SettingsFactory - -Could not obtain connection metadata <java.sql.SQLException: No suitable driver>java.sql.SQLException: No suitable driverAfter lots of confusion I dicided to put a hibernate.properties
Code:
hibernate.dialect = net.sf.hibernate.dialect.Oracle9Dialect
hibernate.connection.driver_class = oracle.jdbc.driver.OracleDriver
hibernate.connection.url = jdbc:oracle:thin:@...
hibernate.connection.username = username
hibernate.connection.password = secret
and it WORKED.
Basically both have the same information.
Just curious about it ... is it a bug or I have any problem in my hibernate.cfg.xml file.