• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2586
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic