apache/seatunnel · error · SeaTunnelException
The following configured DB2 tables are not enabled for capt
Error message
The following configured DB2 tables are not enabled for capture: ${String.join(", ", missingTables)} What it means
TableDiscoveryUtils.validateExplicitCaptureTables compares the user-configured table list against the tables actually enabled for DB2 capture (registered with the ASN capture service). If any configured table is missing from the capture set, it throws SeaTunnelException listing the missing tables.
Source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-db2/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/db2/utils/TableDiscoveryUtils.java:80
*/
public static void validateExplicitCaptureTables(
List<String> configuredTables, List<TableId> capturedTableIds) {
if (configuredTables == null || configuredTables.isEmpty()) {
return;
}
Set<TableId> normalizedCapturedTables =
capturedTableIds.stream()
.map(TableDiscoveryUtils::normalizeCapturedTableId)
.collect(Collectors.toSet());
List<String> missingTables = new ArrayList<>();
for (String configuredTable : configuredTables) {
if (!normalizedCapturedTables.contains(toConfiguredDb2TableId(configuredTable))) {
missingTables.add(configuredTable);
}
}
if (!missingTables.isEmpty()) {
throw new SeaTunnelException(
"The following configured DB2 tables are not enabled for capture: "
+ String.join(", ", missingTables));
}
}
/**
* Db2 Debezium metadata always uses an empty catalog because one connector instance captures a
* single configured database. Explicit SeaTunnel table names still carry the database segment,
* so startup validation needs to drop that catalog part before comparing with capture tables.
*/
static TableId toConfiguredDb2TableId(String configuredTable) {
int firstDot = configuredTable.indexOf('.');
int secondDot = configuredTable.indexOf('.', firstDot + 1);
if (firstDot < 0 || secondDot < 0 || secondDot == configuredTable.length() - 1) {
throw new SeaTunnelException(
"DB2 CDC table-names must use database.schema.table format, but found: "
+ configuredTable);
}View on GitHub (pinned to cf67b549a7)
Solutions
- Register the table for capture: CALL ASNCDC.ADDTABLE('<schema>','<table>') and restart the ASN capture service
- Match identifier case in table-names to DB2 metadata (usually uppercase)
- Verify captured tables: SELECT * FROM ASNCDC.IBMSNAP_REGISTER
- Check the schema qualifier in the configured table-names is correct
Example fix
// before: table configured but never added to capture
table-names = ["MYDB.MYSCHEMA.MYTABLE"]
// after: register first, then run
CALL ASNCDC.ADDTABLE('MYSCHEMA', 'MYTABLE');
CALL ASNCDC.START(); Defensive patterns
Strategy: validation
Validate before calling
// Confirm every configured table is captured before starting the job SELECT SOURCE_OWNER, SOURCE_TABLE FROM ASNCDC.IBMSNAP_REGISTER; -- compare against table-names
Try / catch
try { sourceFactory.createSource(...); } catch (SeaTunnelException e) { if (e.getMessage().contains("not enabled for capture")) { /* register missing tables via ASNCDC.ADDTABLE */ } throw e; } Prevention
- Run ASNCDC.ADDTABLE + restart capture for every table in table-names
- Keep identifier case consistent (uppercase for DB2)
- Re-validate capture registration after adding new tables
When it happens
Trigger: Starting the CDC source with table-names that exist but are not in ASN capture: capture not registered for the table, table added after capture instance creation, or schema/name case mismatch between config and captured set.
Common situations: Forgot to run ASNCDC.ADDTABLE for the table; capture service not restarted after adding tables; config uses lowercase while capture metadata is uppercase; wrong schema qualifier in table-names.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- Incremental snapshot for tables requires primary key, but ta
- DB2 CDC table-names must use database.schema.table format, b
- No captured data collections found in database
- Error to discover tables:
- Table is not enabled for capture
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/018d22a774aa5750.
Report an issue: GitHub.