oracle.jdbc.driver.OracleDatabaseMetaData.getDatabaseMajorVersion

 

I was facing the below issue when I use Oracle 9 JDBC driver along with Hibernate 3.6,

 

Initial SessionFactory creation failed.java.lang.AbstractMethodError: oracle.jdbc.driver.OracleDatabaseMetaData.getDatabaseMajorVersion()I
Exception in thread “main” java.lang.NullPointerException
at org.hibernate.tutorial.test.EventManager.createAndStoreEvent(EventManager.java:20)
at org.hibernate.tutorial.test.EventManager.main(EventManager.java:14)

 

Solution

Switching to Oracle 10.2.0.2 jdbc driver solved the problem immediately, without any configuration change requirements.

 

Download link: http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-10201-088211.html

 

Remember that Oracle recommends you to use 10 series drivers even if you are connecting to a 8 or 9 series database server!

 

Thanks.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: