{"record":{"id":"e1b510e41fb6c62d","repo":"apache/seatunnel","slug":"not-supported-create-new-offset-by-filename-and-po-e1b510","errorCode":null,"errorMessage":"not supported create new Offset by filename and position.","messagePattern":"not supported create new Offset by filename and position\\.","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/oracle/source/offset/RedoLogOffsetFactory.java","lineNumber":71,"sourceCode":"    }\n\n    @Override\n    public Offset latest() {\n        try (JdbcConnection jdbcConnection = dialect.openJdbcConnection(sourceConfig)) {\n            return OracleConnectionUtils.currentRedoLogOffset(jdbcConnection);\n        } catch (Exception e) {\n            throw new RuntimeException(\"Read the redoLog offset error\", e);\n        }\n    }\n\n    @Override\n    public Offset specific(Map<String, String> offset) {\n        return new RedoLogOffset(offset);\n    }\n\n    @Override\n    public Offset specific(String filename, Long position) {\n        throw new UnsupportedOperationException(\n                \"not supported create new Offset by filename and position.\");\n    }\n\n    @Override\n    public Offset timestamp(long timestamp) {\n        try (JdbcConnection jdbcConnection = dialect.openJdbcConnection(sourceConfig)) {\n            return OracleConnectionUtils.timestampToScn(\n                    jdbcConnection, timestamp, sourceConfig.getServerTimeZone());\n        } catch (Exception e) {\n            throw new RuntimeException(\"Convert timestamp to redoLog offset error\", e);\n        }\n    }\n}\n","sourceCodeStart":53,"sourceCodeEnd":85,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/oracle/source/offset/RedoLogOffsetFactory.java#L53-L85","documentation":"RedoLogOffsetFactory.specific(String filename, Long position) is an inherited API shape (filename+position, like binlog offsets) that Oracle CDC does not support because Oracle offsets are SCNs, not file positions. The factory deliberately throws UnsupportedOperationException to reject this call form. Use specific(Map<String,String> offset) instead.","triggerScenarios":"Calling RedoLogOffsetFactory.specific(String filename, Long position) directly, or framework code that restores a split/offset via the filename+position overload (e.g., state restored from a MySQL-CDC style pipeline).","commonSituations":"Reusing source-agnostic checkpoint/restore code that assumes binlog-style offsets; hand-written code creating an offset from (file, position); migrating jobs between MySQL CDC and Oracle CDC connectors.","solutions":["Use RedoLogOffsetFactory.specific(Map<String,String> offset) with an SCN-based offset map instead","Store/restore Oracle CDC offsets as RedoLogOffset (SCN) rather than filename+position","Guard the call: check the concrete offset factory type before invoking the filename/position overload"],"exampleFix":"// before\nOffset offset = factory.specific(\"redo01.log\", 1234L); // UnsupportedOperationException\n// after\nMap<String, String> offsetMap = new HashMap<>();\noffsetMap.put(\"scn\", \"123456\");\nOffset offset = factory.specific(offsetMap);","handlingStrategy":"validation","validationCode":"if (offsetMap == null || !offsetMap.containsKey(\"scn\")) {\n    throw new IllegalArgumentException(\"Oracle CDC offsets must be SCN-based; use specific(Map) with an scn key\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never use the filename+position offset API with Oracle CDC; it is MySQL/binlog-shaped","Always persist and restore Oracle CDC offsets as RedoLogOffset/SCN maps","When writing source-agnostic restore code, branch on connector type before choosing the offset overload"],"tags":["oracle-cdc","unsupported-operation","offset","scn"],"backgroundTag":"unsupported-operation","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}