Curious enough, it looks slike SAP Hana treats a JDBC {{PreparedStatement}} like a {{CallableStatement}}:
{noformat} at com.sap.db.jdbc.CallableStatementSapDB.constructor(CallableStatementSapDB.java:215) at com.sap.db.jdbc.CallableStatementSapDB.<init>(CallableStatementSapDB.java:125) at com.sap.db.jdbc.CallableStatementSapDBFinalize.<init>(CallableStatementSapDBFinalize.java:31) at com.sap.db.jdbc.ConnectionSapDB.prepareStatement(ConnectionSapDB.java:1390) at com.sap.db.jdbc.trace.Connection.prepareStatement(Connection.java:347) {noformat}
The problem is reported in [this forum thread|https://forum.hibernate.org/viewtopic.php?f=1&t=1044157], and is caused by {{org.hibernate.engine.jdbc.internal.ResultSetReturnImpl}} which treats the {{PreparedStatement}} as a {{CallableStatement}} which is not supported by the SAP Hana Driver.
The fix could go likes this. In the {{AbstractHANADialect}}, just add the following method:
{code:java} @Override public ResultSet getResultSet(CallableStatement ps) throws SQLException { return ps.executeQuery(); } {code}
|
|