{"record":{"id":"ee1c672e074e9614","repo":"apache/shardingsphere","slug":"getobject-with-map-ee1c67","errorCode":null,"errorMessage":"getObject with map","messagePattern":"getObject with map","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/resultset/AbstractUnsupportedOperationSQLFederationResultSet.java","lineNumber":205,"sourceCode":"    \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\n    public final Object getObject(final String columnLabel, final Map<String, Class<?>> map) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"getObject with map\");\n    }\n    \n    @Override\n    public final Object getObject(final int columnIndex, final Map<String, Class<?>> map) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"getObject with map\");\n    }\n}\n","sourceCodeStart":187,"sourceCodeEnd":213,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/resultset/AbstractUnsupportedOperationSQLFederationResultSet.java#L187-L213","documentation":"getObject(String, Map<String, Class<?>>) is the legacy JDBC custom-type-map accessor for structured/distinct types. ShardingSphere's federation ResultSet does not implement type-map resolution, so the final method throws SQLFeatureNotSupportedException('getObject with map') unconditionally.","triggerScenarios":"Calling ResultSet.getObject(columnLabel, typeMap) with a non-null java.util.Map type map on a federation ResultSet — e.g. Oracle object types mapped through a connection's type map.","commonSituations":"Legacy Oracle object-relational code carried into a ShardingSphere deployment; utilities that always pass a type map (even an empty one) when reading STRUCT-typed columns; migration from a driver connection to federation mode.","solutions":["Use plain getObject(columnLabel) and handle the returned value (often a String or driver STRUCT) manually.","Move structured/object types out of the schema into ordinary relational columns.","Route statements that need type-map resolution outside the federation engine to the native driver.","Pass null instead of a map if the driver accepts it, letting default mapping apply — but note federation still rejects the two-arg form, so prefer the single-arg call."],"exampleFix":"// before\nObject struct = resultSet.getObject(\"address\", typeMap);\n\n// after\nObject struct = resultSet.getObject(\"address\");","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { value = rs.getObject(\"address\", typeMap); } catch (SQLFeatureNotSupportedException e) { value = rs.getObject(\"address\"); }","preventionTips":["Do not rely on connection type maps when federation is enabled.","Read STRUCT columns as raw objects and convert manually.","Keep Oracle object-relational workloads on a dedicated non-federated datasource."],"tags":["jdbc","sql-federation","resultset","unsupported-operation","type-map","oracle"],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}