{"record":{"id":"8421da180c1f0372","repo":"apache/seatunnel","slug":"not-supported-create-new-offset-by-committed-offse","errorCode":null,"errorMessage":"not supported create new Offset by committed offset.","messagePattern":"not supported create new Offset by committed offset\\.","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/source/offset/OffsetFactory.java","lineNumber":33,"sourceCode":" * limitations under the License.\n */\n\npackage org.apache.seatunnel.connectors.cdc.base.source.offset;\n\nimport java.io.Serializable;\nimport java.util.Map;\n\npublic abstract class OffsetFactory implements Serializable {\n    public OffsetFactory() {}\n\n    public abstract Offset earliest();\n\n    public abstract Offset neverStop();\n\n    public abstract Offset latest();\n\n    public Offset committedOffset() {\n        throw new UnsupportedOperationException(\n                \"not supported create new Offset by committed offset.\");\n    }\n\n    public abstract Offset specific(Map<String, String> offset);\n\n    public abstract Offset specific(String filename, Long position);\n\n    public abstract Offset timestamp(long timestamp);\n}\n","sourceCodeStart":15,"sourceCodeEnd":43,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/source/offset/OffsetFactory.java#L15-L43","documentation":"OffsetFactory.committedOffset() is an optional capability: by default it throws UnsupportedOperationException because only some connector dialects can build an Offset from a source's committed offset. Calling it on a factory that doesn't support committed-offset-based startup positions fails immediately.","triggerScenarios":"getStartupOffset() or shouldReuseCheckpointedStartupOffsetAfterRestore() calls committedOffset() on a dialect whose OffsetFactory hasn't overridden it — i.e. a startup.mode/restore path relying on committed offsets with a dialect that can't produce them.","commonSituations":"Using a startup mode that depends on committed offsets with a CDC connector (e.g. certain SQL Server/Oracle setups) that lacks the feature; upgrading a job where the restore path now requests committed offsets for an unsupported dialect.","solutions":["Use a supported startup.mode (initial, earliest, latest, or specific timestamp/offset) instead of one requiring committed offsets","Check the specific connector's docs for supported startup modes and offset types","Override committedOffset() in a custom OffsetFactory if you own the dialect implementation","Upgrade SeaTunnel/connector version in case committed-offset support was added for your dialect"],"exampleFix":"// before\n// startup: { mode: \"committed\" }   // unsupported by this connector's OffsetFactory\n// after\n// startup: { mode: \"specific\", \"specific-offset-file\": \"mysql-bin.000010\", \"specific-offset-pos\": 4321 }","handlingStrategy":"validation","validationCode":"// Only use committed-offset startup when the dialect supports it:\nif (offsetFactory.getClass().getMethod(\"committedOffset\").getDeclaringClass() == OffsetFactory.class) {\n    throw new IllegalArgumentException(\"This connector does not support committed-offset startup\");\n}","typeGuard":null,"tryCatchPattern":"try { return factory.committedOffset(); }\ncatch (UnsupportedOperationException e) { return factory.latest(); }","preventionTips":["Check connector docs for supported startup modes before using committed offsets","Prefer explicit specific-offset config over committed-offset defaults"],"tags":["cdc","offset","unsupported-operation"],"backgroundTag":"unsupported-operation","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}