apache/seatunnel · error · UnsupportedOperationException
not supported create new Offset by filename and position.
Error message
not supported create new Offset by filename and position.
What it means
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.
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
Example fix
// before
Offset offset = factory.specific("redo01.log", 1234L); // UnsupportedOperationException
// after
Map<String, String> offsetMap = new HashMap<>();
offsetMap.put("scn", "123456");
Offset offset = factory.specific(offsetMap); Defensive patterns
Strategy: validation
Validate before calling
if (offsetMap == null || !offsetMap.containsKey("scn")) {
throw new IllegalArgumentException("Oracle CDC offsets must be SCN-based; use specific(Map) with an scn key");
} Prevention
- 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
When it happens
Trigger: 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).
Common situations: 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.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Convert timestamp to redoLog offset error
- Read the redoLog offset error
- Cannot convert timestamp to SCN. Make sure the specified…
- Cannot read the redo log position via 'SELECT CURRENT_SCN…
- Failed to convert timestamp to SCN
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/e1b510e41fb6c62d.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/oracle/source/offset/RedoLogOffsetFactory.java:71
}
@Override
public Offset latest() {
try (JdbcConnection jdbcConnection = dialect.openJdbcConnection(sourceConfig)) {
return OracleConnectionUtils.currentRedoLogOffset(jdbcConnection);
} catch (Exception e) {
throw new RuntimeException("Read the redoLog offset error", e);
}
}
@Override
public Offset specific(Map<String, String> offset) {
return new RedoLogOffset(offset);
}
@Override
public Offset specific(String filename, Long position) {
throw new UnsupportedOperationException(
"not supported create new Offset by filename and position.");
}
@Override
public Offset timestamp(long timestamp) {
try (JdbcConnection jdbcConnection = dialect.openJdbcConnection(sourceConfig)) {
return OracleConnectionUtils.timestampToScn(
jdbcConnection, timestamp, sourceConfig.getServerTimeZone());
} catch (Exception e) {
throw new RuntimeException("Convert timestamp to redoLog offset error", e);
}
}
}
View on GitHub (pinned to cf67b549a7)