on 05-30-2017 6:12 PM
Hi,
Facing the below exception when im trying to access the ScrollableResults.first() and ScrollableResults.last(). Can any one help me out.
Does SAP HANA JDBC driver support only FORWARD_ONLY cursor ?
Caused by: org.hibernate.exception.GenericJDBCException: could not advance using first() at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54) com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: The operation is not allowed for result set type FORWARD_ONLY.
Correct, the HANA JDBC driver only supports the FORWARD_ONLY cursor type. (checked with HANA 2 JDBC driver 2.1.2).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gee... Google seems to be broken... *cough*.
Why not have a look e.g. here https://stackoverflow.com/questions/40152908/hibernate-get-the-last-element-of-a-scrollableresults-w... ?
Generally speaking: no, if the driver doesn't support scrollable result sets, then there's no way to "convice" it to still accept the method calls.
So, whatever your application actually wants to do with the calls to the hibernate resultset, you may want to check whether the first()/last() operation is available before using it.
Out of interest: what do you do with the first/last record in your application?
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.