aspose file tools*
The moose likes JDBC and the fly likes What is the connection string for Driver and url used for hibernate in Oracle 9 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "What is the connection string for Driver and url used for hibernate in Oracle 9" Watch "What is the connection string for Driver and url used for hibernate in Oracle 9" New topic
Author

What is the connection string for Driver and url used for hibernate in Oracle 9

sumanta panda
Ranch Hand

Joined: Jun 23, 2008
Posts: 224
Dear All,

i have installed oracle 9i in my machine.While running the hibernet application i am getting Initial SessionFactory creation .
i am getting Initial SessionFactory creation failed.org.hibernate.HibernateException: JDBC Driver class not found: org.hsqldb.jdbcDriver
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.vaannila.util.HibernateUtil.<clinit>(HibernateUtil.java:14)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at com.vaannila.student.Main.main(Main.java:12)
Caused by: org.hibernate.HibernateException: JDBC Driver class not found: org.hsqldb.jdbcDriver
at org.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:89)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:79)
at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:448)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)
at com.vaannila.util.HibernateUtil.<clinit>(HibernateUtil.java:11)
... 3 more
Caused by: java.lang.ClassNotFoundException: org.hsqldb.jdbcDriver
at java.lang.Class.forName(Class.java:127)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:123)
at org.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:84)
... 10 more
runtime exeception.

My doubt is for oracle 9i what is the peace of code i would replace hibernate.cfg.xml for connection driver so that it should work.
<property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="hibernate.connection.url">jdbc:hsqldb:hsql://localhost</property>
<property name="hibernate.connection.username">scott</property>
<property name="connection.password">tiger</property>



hibernate.cfg.xml



Please suggest me for the needful.

Thanks,
Sumanta
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2510
    
  10

They are the standard Oracle Driver and URL, as documented in your Oracle Reference.

For Oracle 9, this is an interesting resource: JDBC Developer’s Guide and Reference. In Section 3, the topic "Sample: Connecting, ..." contains the info you need.

OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the connection string for Driver and url used for hibernate in Oracle 9