{"record":{"id":"6b061bf321dd4ea5","repo":"apache/shardingsphere","slug":"getrowid","errorCode":null,"errorMessage":"getRowId","messagePattern":"getRowId","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/unsupported/AbstractUnsupportedOperationResultSet.java","lineNumber":185,"sourceCode":"    \n    @Override\n    public final Reader getNCharacterStream(final String columnLabel) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"getNCharacterStream\");\n    }\n    \n    @Override\n    public final Ref getRef(final int columnIndex) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"getRef\");\n    }\n    \n    @Override\n    public final Ref getRef(final String columnLabel) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"getRef\");\n    }\n    \n    @Override\n    public final RowId getRowId(final int columnIndex) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"getRowId\");\n    }\n    \n    @Override\n    public final RowId getRowId(final String columnLabel) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"getRowId\");\n    }\n    \n    @Override\n    public <T> T getObject(final int columnIndex, final Class<T> type) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"getObject with type\");\n    }\n    \n    @Override\n    public <T> T getObject(final String columnLabel, final Class<T> type) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"getObject with type\");\n    }\n    \n    @Override","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/unsupported/AbstractUnsupportedOperationResultSet.java#L167-L203","documentation":"getRowId(int columnIndex) is final in AbstractUnsupportedOperationResultSet and throws SQLFeatureNotSupportedException. Although a row-id value could in principle pass through, the sharding driver does not expose RowId objects because row identity is shard-local and cannot be meaningfully used in positioned operations across the merged result.","triggerScenarios":"Calling ResultSet.getRowId(columnIndex) on a sharding ResultSet — often mappers handling Types.ROWID (Oracle ROWID pseudo-column, MySQL's implicit rowid use) or code that uses RowId for later Statement/PreparedStatement row-id updates.","commonSituations":"Oracle ROWID-based fast-path updates ported behind the sharding layer; SELECT ROWID queries still present in SQL; ORM dialect code that fetches RowId for identity tracking.","solutions":["Select and use the table's primary key instead of ROWID for identifying rows, and update with WHERE pk = ?.","Remove ROWID pseudo-columns from SELECT lists executed through the sharding datasource.","If ROWID fast paths are essential for a maintenance job, run it against the physical datasource connection."],"exampleFix":"// before\nRowId rowId = rs.getRowId(1); // throws\nps.setRowId(1, rowId);\n\n// after\nlong id = rs.getLong(\"id\");\nps.setLong(1, id); // UPDATE ... WHERE id = ?","handlingStrategy":"validation","validationCode":"// include the PK in your SELECT and use it instead of ROWID\nlong id = rs.getLong(\"id\");","typeGuard":null,"tryCatchPattern":"try {\n    rowId = rs.getRowId(col);\n} catch (SQLFeatureNotSupportedException e) {\n    id = rs.getLong(\"id\"); // use primary key\n}","preventionTips":["Remove ROWID pseudo-columns from SQL routed through ShardingSphere.","Use primary keys for identity and concurrency checks.","Keep ROWID fast paths on physical-datasource connections only."],"tags":["jdbc","resultset","rowid","shardingsphere","unsupported-operation"],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}