{"record":{"id":"f7160c6f57f13abf","repo":"apache/shardingsphere","slug":"setrowid","errorCode":null,"errorMessage":"setRowId","messagePattern":"setRowId","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/unsupported/AbstractUnsupportedOperationPreparedStatement.java","lineNumber":79,"sourceCode":"    \n    @Override\n    public final void setNClob(final int parameterIndex, final Reader x, final long length) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"setNClob\");\n    }\n    \n    @Override\n    public final void setNCharacterStream(final int parameterIndex, final Reader x) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"setNCharacterStream\");\n    }\n    \n    @Override\n    public final void setNCharacterStream(final int parameterIndex, final Reader x, final long length) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"setNCharacterStream\");\n    }\n    \n    @Override\n    public final void setRowId(final int parameterIndex, final RowId x) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"setRowId\");\n    }\n    \n    @Override\n    public final void setRef(final int parameterIndex, final Ref x) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"setRef\");\n    }\n    \n    @Override\n    public final ResultSet executeQuery(final String sql) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"executeQuery with SQL for PreparedStatement\");\n    }\n    \n    @Override\n    public final int executeUpdate(final String sql) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"executeUpdate with SQL for PreparedStatement\");\n    }\n    \n    @Override","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/unsupported/AbstractUnsupportedOperationPreparedStatement.java#L61-L97","documentation":"SQLFeatureNotSupportedException('setRowId') thrown by AbstractUnsupportedOperationPreparedStatement.setRowId(int, RowId). java.sql.RowId is an opaque driver/vendor handle (Oracle ROWID, DB2 RID) that cannot survive ShardingSphere's parse-and-rebind pipeline across heterogeneous backends; the method is final and always throws.","triggerScenarios":"ps.setRowId(1, rowId) on a ShardingSphere PreparedStatement; realistically reached only by generic binders that dispatch on instanceof RowId, or code written against Oracle's ROWID pseudo-column.","commonSituations":"Oracle ROWID-optimization code (WHERE ROWID = ?) reused in a sharded environment; ORM custom types for vendor ROWID columns; speculative code copied from JDBC documentation.","solutions":["Bind the ROWID as its string form: ps.setString(1, rowId.toString()) when the backend accepts it (Oracle does).","Replace ROWID-based access with the table's real primary key — required anyway for consistent sharding routing.","Remove the generic RowId branch from your binder; no ShardingSphere backend path supports it."],"exampleFix":"// before\nps.setRowId(1, rowId);\n\n// after\nps.setString(1, rowId.toString()); // or better: WHERE id = ? with the primary key","handlingStrategy":"fallback","validationCode":"if (value instanceof RowId) { ps.setString(idx, ((RowId) value).toString()); } else { ps.setObject(idx, value); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never bind java.sql.RowId through sharded connections","Use primary keys instead of ROWID for row addressing","Bind ROWID strings via setString where the backend accepts them"],"tags":["jdbc","shardingsphere","preparedstatement","rowid","oracle","sql-feature-not-supported"],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}