Monday, August 02, 2010

An application based on Spring / JPA / Hibernate stack started causing following error when the Oracle JDBC library was upgraded from ojdbc14.jar to ojdbc6.jar.

java.lang.IllegalAccessException: Class org.hibernate.dialect.Oracle8iDialect can not access a member of class oracle.jdbc.driver.OracleTypes with modifiers ""
at sun.reflect.Reflection.ensureMemberAccess(
at java.lang.Class.newInstance0(
at java.lang.Class.newInstance(
at org.hibernate.dialect.Oracle8iDialect.registerResultSetOutParameter(

Caused by oracle.jdbc.driver.OracleTypes class being deprecated and replaced by oracle.jdbc.OracleTypes and Oracle8iDialect (line 397) class referring to a private member of OracleTypes class.

  1. Fix is to use a hibernate distro with the fix that is also compatible to Spring 3 stack.
  2. Thanks to Google and grepcode; found the fix been applied for Hibernate 3.3.2 (line 432)
  3. Also realized in this research that there exists NO at Spring download site :-;( which makes it all the more difficult to find a spring bundle with the fix.

No comments:

I am well fed with these !!