0

I have a Struts-Hibernate application which is using Oracle 10g for database persistence. While running the application, sometimes at the time of execute SQL queries, I am getting an exception like:

org.hibernate.exception.GenericJDBCException: could not execute query

I checked through google and found that it may occur due to Hibernate and Oracle (database) version mismatch.

Below are the links, but could not found proper solution: Hibernate 3.3.0 compatibility with Oracle 12c

Version Mismatch between Hiberate and Database

I want to know, Is there any compatibility matrix for these two, so that we can properly understand which version we need to use:

My hibernate version is: 4.3.11 final

My oracle version is : 10G

below is the Maven dependency:

<dependency>
    <groupId>com.oracle</groupId>
    <artifactId>ojdbc6</artifactId>
    <version>6.0.0.0</version>
</dependency>
<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-core</artifactId>
    <version>4.3.11.Final</version>
</dependency>

in the hibernate.cfg.xml, the Dialect is mentioned as:

<property name="dialect">org.hibernate.dialect.Oracle10gDialect</property>

Any one please suggest me the exact version matches for Hibernate & Oracle.

OR, if there is any other solution to resolve this GenericJDBCException, please suggest that also.

Jerry
  • 281
  • 4
  • 21
  • Frequently that hibernate exception has a "caused by" in the full stack trace. Is there any other exception details for example "Caused by: "? – camtastic Sep 20 '19 at 13:59
  • Yes the hibernate exception has a "Caused by" part: _**Caused by: java.sql.SQLException: Exhausted Resultset**_ _at oracle.jdbc.driver.OracleResultSetImpl.getDate(OracleResultSetImpl.java:732) at oracle.jdbc.driver.OracleResultSet.getDate(OracleResultSet.java:410)_ _at com.mchange.v2.c3p0.impl.NewProxyResultSet.getDate(NewProxyResultSet.java:2988)_ – Jerry Sep 23 '19 at 09:45
  • Can you post some code of the data access method where the error occurs? – camtastic Sep 23 '19 at 09:51

1 Answers1

0

Looks like this page can help you java.sql.SQLException: Exhausted Resultset

the underlying root cause is, you are trying to loop outside of the result set (not related with dialect or the hibernate, but on the code itself). Hope it helps.