apache/seatunnel · warning

Skip failed JDBC source table in discovery

Error message

Skip failed JDBC source table in discovery: {}

What it means

During multi-table JDBC discovery, JdbcCatalogUtils logs a warning and skips a table that could not be loaded, instead of failing the whole job. The table path, plugin name, and error are recorded via MultiTableFailureHelper so the failure is reported at the end of discovery.

Solutions

  1. Check the recorded failed-table line for the exact table path and root cause exception
  2. Verify the table exists in the target database (SHOW TABLES / \dt) and correct the table-list entry
  3. Confirm the JDBC user has privileges to describe/read the table
  4. Remove the broken table from the config or fix case sensitivity of database/table names

Example fix

// before
table_list = ["db.orders", "db.oders"]   // typo
// after
table_list = ["db.orders", "db.users"]
Defensive patterns

Strategy: validation

Validate before calling

// Before submitting, verify every table in table_list exists and is accessible
for (String path : tableList) {
    TablePath tp = TablePath.parse(path);
    if (!catalog.tableExists(tp.getDatabaseName(), tp.getTableName())) {
        throw new IllegalArgumentException("Table missing or inaccessible: " + path);
    }
}

Try / catch

// Discovery itself never throws for one bad table; collect failed tables after job config build
List<CatalogTable> tables = JdbcCatalogUtils.getTables(...);
// compare against expected table list to detect silently skipped entries

Prevention

When it happens

Trigger: getTables() iterates configured table paths; metadata retrieval for one table (e.g. jdbcCatalog.getTable) throws, so logSkipFailedTable records the table as MultiTableFailurePhase.DISCOVERY and continues with the remaining tables.

Common situations: A table in the table-list was dropped or renamed; user lacks SELECT/DESC privileges on one table; wrong database name in a path; connectivity issues to one host of a cluster; case-mismatched schema/table names.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/f02bcd312161eb41. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/utils/JdbcCatalogUtils.java:213

                    } else {
                        throw wrapThrowable(e);
                    }
                }
            }
            log.info(
                    "Loaded {} catalog tables for jdbc : {}",
                    tables.size(),
                    jdbcConnectionConfig.getUrl());
            return tables;
        }
    }

    private static void logSkipFailedTable(String tablePath, String pluginName, Throwable error) {
        MultiTableFailedTable failedTable =
                MultiTableFailureHelper.buildFailedTable(
                        tablePath, MultiTableFailurePhase.DISCOVERY, pluginName, error);
        MultiTableFailureHelper.recordFailedTable(failedTable);
        log.warn(
                "Skip failed JDBC source table in discovery: {}",
                MultiTableFailureHelper.formatFailedTableLine(failedTable),
                error);
    }

    private static RuntimeException wrapThrowable(Throwable error)
            throws SQLException, ClassNotFoundException {
        if (error instanceof SQLException) {
            throw (SQLException) error;
        }
        if (error instanceof ClassNotFoundException) {
            throw (ClassNotFoundException) error;
        }
        if (error instanceof RuntimeException) {
            return (RuntimeException) error;
        }
        return new RuntimeException(error);
    }

View on GitHub (pinned to cf67b549a7)