{"record":{"id":"6ce08fff2f679af7","repo":"apache/seatunnel","slug":"oracle-cdc-specific-startup-mode-uses-startup-spec","errorCode":null,"errorMessage":"Oracle-CDC specific startup mode uses startup.specific-offset.scn instead of file or position offsets.","messagePattern":"Oracle-CDC specific startup mode uses startup\\.specific-offset\\.scn instead of file or position offsets\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/oracle/source/OracleIncrementalSource.java","lineNumber":121,"sourceCode":"        Optional<Long> startupSpecificOffsetScn =\n                config.getOptional(OracleIncrementalSourceOptions.STARTUP_SPECIFIC_OFFSET_SCN);\n\n        if (startupMode != StartupMode.SPECIFIC) {\n            if (startupSpecificOffsetScn.isPresent()) {\n                throw new IllegalArgumentException(\n                        OracleIncrementalSourceOptions.STARTUP_SPECIFIC_OFFSET_SCN.key()\n                                + \" is only supported when startup.mode is specific.\");\n            }\n            return new StartupConfig(\n                    startupMode,\n                    config.get(SourceOptions.STARTUP_SPECIFIC_OFFSET_FILE),\n                    config.get(SourceOptions.STARTUP_SPECIFIC_OFFSET_POS),\n                    config.get(SourceOptions.STARTUP_TIMESTAMP));\n        }\n\n        if (config.getOptional(SourceOptions.STARTUP_SPECIFIC_OFFSET_FILE).isPresent()\n                || config.getOptional(SourceOptions.STARTUP_SPECIFIC_OFFSET_POS).isPresent()) {\n            throw new IllegalArgumentException(\n                    \"Oracle-CDC specific startup mode uses \"\n                            + OracleIncrementalSourceOptions.STARTUP_SPECIFIC_OFFSET_SCN.key()\n                            + \" instead of file or position offsets.\");\n        }\n\n        Long scn =\n                startupSpecificOffsetScn.orElseThrow(\n                        () ->\n                                new IllegalArgumentException(\n                                        OracleIncrementalSourceOptions.STARTUP_SPECIFIC_OFFSET_SCN\n                                                        .key()\n                                                + \" is required when startup.mode is specific.\"));\n        if (scn <= 0) {\n            throw new IllegalArgumentException(\n                    OracleIncrementalSourceOptions.STARTUP_SPECIFIC_OFFSET_SCN.key()\n                            + \" must be greater than 0.\");\n        }\n","sourceCodeStart":103,"sourceCodeEnd":139,"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/OracleIncrementalSource.java#L103-L139","documentation":"When startup.mode = specific, Oracle CDC positions the reader at an SCN, not at a binlog-style file/position. getOracleStartupConfig therefore rejects startup.specific-offset.file or startup.specific-offset.pos if either is set, since those generic JDBC-source offsets are meaningless for Oracle redo logs.","triggerScenarios":"startup.mode = \"specific\" combined with startup.specific-offset.file = \"...\" or startup.specific-offset.pos set; getStartupConfig calls getOracleStartupConfig and hits the guard after the non-specific branch.","commonSituations":"Users copy a MySQL CDC specific-offset config (file + pos) and reuse it for Oracle; templates shared between MySQL/Oracle jobs.","solutions":["Delete startup.specific-offset.file and startup.specific-offset.pos from the config.","Specify startup.specific-offset.scn with the target SCN instead.","Obtain a current SCN via SELECT current_scn FROM v$database if unsure."],"exampleFix":"// before\nstartup.mode = \"specific\"\nstartup.specific-offset.file = \"mysql-bin.000001\"\nstartup.specific-offset.pos = 4\n// after\nstartup.mode = \"specific\"\nstartup.specific-offset.scn = 2518210","handlingStrategy":"validation","validationCode":"if (\"specific\".equals(config.get(\"startup.mode\")) &&\n    (config.hasPath(\"startup.specific-offset.file\") || config.hasPath(\"startup.specific-offset.pos\")))\n    throw new IllegalArgumentException(\"use startup.specific-offset.scn for Oracle\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never copy MySQL file/pos startup blocks into Oracle CDC configs.","Use startup.specific-offset.scn exclusively for Oracle specific mode."],"tags":["oracle-cdc","startup-mode","offset","config-validation"],"backgroundTag":"mutually-exclusive-options","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"}