{"record":{"id":"313d970e53c25979","repo":"apache/shardingsphere","slug":"getrowid-313d97","errorCode":null,"errorMessage":"getRowId","messagePattern":"getRowId","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/resultset/AbstractUnsupportedOperationSQLFederationResultSet.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/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/resultset/AbstractUnsupportedOperationSQLFederationResultSet.java#L167-L203","documentation":"ROWID is a vendor-specific identifier type exposed through the JDBC RowId interface. ShardingSphere's in-memory federation ResultSet does not carry driver ROWIDs, so getRowId(int) is final and unconditionally throws SQLFeatureNotSupportedException.","triggerScenarios":"Calling ResultSet.getRowId(int columnIndex) on a federation ResultSet — typically code that relies on Oracle/MySQL ROWID pseudo-columns for fast row addressing or optimistic locking.","commonSituations":"Oracle-oriented applications that SELECT ROWID or use WHERE ROWID = ?; ORM 'rowid' dialect features enabled against ShardingSphere; migration from a driver connection where getRowId worked to a federation-enabled datasource.","solutions":["Select an explicit primary-key column instead of ROWID and use it for row addressing.","Read the ROWID column as a String via getString(columnIndex) when the database renders it as a pseudo-column value.","Disable federation for the affected statements so the native driver ResultSet (which supports getRowId) is returned.","Adjust ORM dialect settings to stop emitting ROWID-based operations under ShardingSphere."],"exampleFix":"// before\nRowId rowId = resultSet.getRowId(1);\n\n// after\nString id = resultSet.getString(1); // select the primary key instead of ROWID","handlingStrategy":"fallback","validationCode":"if (resultSet.getMetaData().getColumnType(1) == Types.ROWID) { /* expect getString fallback under federation */ }","typeGuard":null,"tryCatchPattern":"try { RowId rid = rs.getRowId(1); } catch (SQLFeatureNotSupportedException e) { String rid = rs.getString(1); }","preventionTips":["Avoid ROWID-based addressing in applications that run over ShardingSphere.","Always SELECT an explicit primary key alongside ROWID so a fallback identifier exists.","Disable ROWID-oriented ORM dialect features when using federation."],"tags":["jdbc","sql-federation","resultset","unsupported-operation","rowid"],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}