• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I'm executing hibernate program but every time I'm getting Initial SessionFactory creation failed

 
sriramoju srikanth
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
16 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.5.1-Final
16 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
16 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
16 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
78 [main] INFO org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
78 [main] INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
125 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : com/kanth/mapping/Employee.hbm.xml
172 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.kanth.domain.Employee -> EMPLOYEE
172 [main] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null
203 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
203 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20
203 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
219 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: oracle.jdbc.driver.OracleDriver at URL: jdbcracle:thin:@localhost:1521:xe
219 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=hibernate, password=****}
312 [main] INFO org.hibernate.cfg.SettingsFactory - RDBMS: Oracle, version: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
312 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: Oracle JDBC driver, version: 8.1.7.0.0
328 [main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.Oracle10gDialect
Initial SessionFactory creation failed.java.lang.AbstractMethodError: oracle.jdbc.driver.OracleDatabaseMetaData.getJDBCMajorVersion()I
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.kanth.util.HibernateUtil.<clinit>(HibernateUtil.java:16)
at com.kanth.test.CreateEmployee.main(CreateEmployee.java:16)
Caused by: java.lang.AbstractMethodError: oracle.jdbc.driver.OracleDatabaseMetaData.getJDBCMajorVersion()I
at org.hibernate.engine.jdbc.JdbcSupportLoader.useContextualLobCreation(JdbcSupportLoader.java:78)
at org.hibernate.engine.jdbc.JdbcSupportLoader.loadJdbcSupport(JdbcSupportLoader.java:52)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:121)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2163)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2159)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1383)
at com.kanth.util.HibernateUtil.<clinit>(HibernateUtil.java:13)
... 1 more
 
Prabaharan Gopalan
Ranch Hand
Posts: 66
Java Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the version of ojdbc jar that you're using? Let us know if this works for you: http://technicalrecyclebin.wordpress.com/2011/06/06/oracle-jdbc-driver-oracledatabasemetadata-getdatabasemajorversion/
 
sriramoju srikanth
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using ojdbc14.jar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic