{"record":{"id":"b27f1a0321be518e","repo":"apache/shardingsphere","slug":"getncharacterstream","errorCode":null,"errorMessage":"getNCharacterStream","messagePattern":"getNCharacterStream","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/unsupported/AbstractUnsupportedOperationResultSet.java","lineNumber":165,"sourceCode":"    \n    @Override\n    public final int getHoldability() throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"getHoldability\");\n    }\n    \n    @Override\n    public final NClob getNClob(final int columnIndex) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"getNClob\");\n    }\n    \n    @Override\n    public final NClob getNClob(final String columnLabel) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"getNClob\");\n    }\n    \n    @Override\n    public final Reader getNCharacterStream(final int columnIndex) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"getNCharacterStream\");\n    }\n    \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","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/unsupported/AbstractUnsupportedOperationResultSet.java#L147-L183","documentation":"getNCharacterStream(int columnIndex) is final in AbstractUnsupportedOperationResultSet and always throws SQLFeatureNotSupportedException. The sharding driver does not expose national-character columns through the N-specific streaming accessor on its merged ResultSet.","triggerScenarios":"Calling ResultSet.getNCharacterStream(columnIndex) on a ResultSet from ShardingSphereDataSource — usually in streaming readers for large NCHAR/NVARCHAR/NCLOB data or type-dispatching row mappers.","commonSituations":"Large national-character column handling written against Oracle/SQL Server drivers; common-dbutils/ORM type handlers that pick getNCharacterStream for Types.NCLOB/NVARCHAR; migration to the sharding URL without auditing N-accessor usage.","solutions":["Use getCharacterStream(columnIndex) (or getString) instead — the regular character stream accessor is supported and returns the same text.","Wrap the returned Reader for your streaming pipeline; for repeated small reads, getString is simpler.","Update mapper type handlers to prefer non-N accessors under this driver."],"exampleFix":"// before\nReader reader = rs.getNCharacterStream(3); // throws\n\n// after\nReader reader = rs.getCharacterStream(3);","handlingStrategy":"fallback","validationCode":"Reader reader = rs.getCharacterStream(col); // same text, supported accessor","typeGuard":null,"tryCatchPattern":"try {\n    reader = rs.getNCharacterStream(col);\n} catch (SQLFeatureNotSupportedException e) {\n    reader = rs.getCharacterStream(col);\n}","preventionTips":["Always stream national-character data via getCharacterStream/getString.","Type handlers should map NCLOB/NVARCHAR to the plain character-stream path.","Unit-test large-value streaming against the sharding driver."],"tags":["jdbc","resultset","nchar","streaming","shardingsphere","unsupported-operation"],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}