the code like this:
the exception like this:
java.sql.SQLFeatureNotSupportedException at com.salesforce.phoenix.jdbc.PhoenixResultSet.first(PhoenixResultSet.java:173)
the code like this:
the exception like this:
java.sql.SQLFeatureNotSupportedException at com.salesforce.phoenix.jdbc.PhoenixResultSet.first(PhoenixResultSet.java:173)
If you recode your code to use next()
instead of first()
you'll be fine:
while(resultset.next()) {
//Do something with resultset
}
If you're looking for the why though... you'll have to go and ask the developers of that JDBC driver. As positioning inside a ResultSet
requires a scrollable ResultSet
, it is possible that this feature simply is not there.
The implementation for ResultSet.first() is not yet done in Apache Phenix. Hence, you get the error.
public boolean first() throws SQLException {
throw new SQLFeatureNotSupportedException();
}
Try using ResultSet.next() function.