apache/shardingsphere · error · SQLFeatureNotSupportedException
rowUpdated
Error message
rowUpdated
What it means
rowUpdated() is final in AbstractUnsupportedOperationResultSet and unconditionally throws SQLFeatureNotSupportedException. The sharding ResultSet has no updatable cursor, so it cannot report whether the current row was modified via updateRow.
Source
Thrown at jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/unsupported/AbstractUnsupportedOperationResultSet.java:135
@Override
public final void moveToInsertRow() throws SQLException {
throw new SQLFeatureNotSupportedException("moveToInsertRow");
}
@Override
public final void moveToCurrentRow() throws SQLException {
throw new SQLFeatureNotSupportedException("moveToCurrentRow");
}
@Override
public final boolean rowInserted() throws SQLException {
throw new SQLFeatureNotSupportedException("rowInserted");
}
@Override
public final boolean rowUpdated() throws SQLException {
throw new SQLFeatureNotSupportedException("rowUpdated");
}
@Override
public final boolean rowDeleted() throws SQLException {
throw new SQLFeatureNotSupportedException("rowDeleted");
}
@Override
public final String getCursorName() throws SQLException {
throw new SQLFeatureNotSupportedException("getCursorName");
}
@Override
public final int getHoldability() throws SQLException {
throw new SQLFeatureNotSupportedException("getHoldability");
}
@OverrideView on GitHub (pinned to e952770a21)
Solutions
- Maintain dirty-row state in the application (compare against the original fetched values) instead of querying the ResultSet.
- Detect changes with SQL (e.g. compare an updated_at/version column in a keyed SELECT).
- Avoid cursor updates entirely — issue UPDATE statements, which never need rowUpdated.
Example fix
// before
if (rs.rowUpdated()) { markDirty(row); } // throws
// after
boolean dirty = !Objects.equals(fetchedValue, currentValue);
if (dirty) { markDirty(row); } Defensive patterns
Strategy: try-catch
Validate before calling
// no capability probe; compare values instead before relying on rowUpdated boolean dirty = !Objects.equals(originalValue, rs.getObject(col));
Try / catch
try {
boolean updated = rs.rowUpdated();
} catch (SQLFeatureNotSupportedException e) {
updated = appDirtySet.contains(id);
} Prevention
- Keep original fetched values and diff in application code.
- Use version/updated_at columns for change detection.
- All modifications via SQL — then rowUpdated is never needed.
When it happens
Trigger: Calling ResultSet.rowUpdated() on a sharding ResultSet, typically in UI grids or audit logic that highlights rows changed through positioned updates.
Common situations: Change-highlighting in editable table components; conflict-detection code written for single-DB drivers; reuse of vendor sample code for CONCUR_UPDATABLE on the sharding URL.
Related errors
AI-assisted analysis of apache/shardingsphere@e952770a21 (2026-08-14).
Data as JSON: /api/errors/0f724f4fb759d0e9.
Report an issue: GitHub.