• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

hibernate env setup - oracledriver issue

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am started basic hibernate environment setup in eclipse galileo.When i am trying to run the application, I have problem with OracleDriver class.I have added jar files(ojdbc14.jar, ojdbc14_g.jar) in build path. Here the error follows.please help with this..

Jan 30, 2010 12:20:49 PM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.3.2.GA
Jan 30, 2010 12:20:50 PM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Jan 30, 2010 12:20:50 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : javassist
Jan 30, 2010 12:20:50 PM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
Jan 30, 2010 12:20:50 PM org.hibernate.cfg.Configuration configure
INFO: configuring from resource: /hibernate.cfg.xml
Jan 30, 2010 12:20:50 PM org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: Configuration resource: /hibernate.cfg.xml
Jan 30, 2010 12:20:50 PM org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource : contact.hbm.xml
Jan 30, 2010 12:20:50 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: test.hib.Contact -> CONTACT
Jan 30, 2010 12:20:50 PM org.hibernate.cfg.Configuration doConfigure
INFO: Configured SessionFactory: null
Jan 30, 2010 12:20:51 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Using Hibernate built-in connection pool (not for production use!)
Jan 30, 2010 12:20:51 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Hibernate connection pool size: 10
Jan 30, 2010 12:20:51 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: autocommit mode: false
Jan 30, 2010 12:20:51 PM org.hibernate.connection.DriverManagerConnectionProvider configure
SEVERE: JDBC Driver class not found: oracle.jdbc.diver.OracleDriver
java.lang.ClassNotFoundException: oracle.jdbc.diver.OracleDriver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:192)
at org.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:84)
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:425)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2119)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2115)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1339)
at test.hib.client.Client.main(Client.java:15)
JDBC Driver class not found: oracle.jdbc.diver.OracleDriver
Exception in thread "main" java.lang.NullPointerException
at test.hib.client.Client.main(Client.java:29)


Thank you,
Ashok
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ashok,

java.lang.ClassNotFoundException: oracle.jdbc.diver.OracleDriver

the problem is with the spelling of driver
it should be

oracle.jdbc.driver.OracleDriver

in addition
please make sure that the jar you added is not corrupted and you placed it in proper way. I mean for galileo
right click on project -> build path -> configure build path -> select libraries tab -> Add External Jars

if still problem is there please provide your configuration file as well.

thank you,
ishaan
 
AshokKumar reddy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ishaan,

Thank you...silly mistake of mine.....

 
We don't have time to be charming! Quick, read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic