wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes hibernate env setup - oracledriver issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "hibernate env setup - oracledriver issue" Watch "hibernate env setup - oracledriver issue" New topic
Author

hibernate env setup - oracledriver issue

AshokKumar reddy
Greenhorn

Joined: Jan 19, 2010
Posts: 10
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
ishan dave
Ranch Hand

Joined: Apr 16, 2007
Posts: 39
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

Joined: Jan 19, 2010
Posts: 10
Hi Ishaan,

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

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hibernate env setup - oracledriver issue