apache/seatunnel · error · TableNotExistException
Table 'TablePath{databaseName='null', schemaName='null', tab
Error message
Table 'TablePath{databaseName='null', schemaName='null', tableName='null'}' does not exist in catalog 'null' What it means
AbstractJdbcCatalog.getTable() first checks tableExists(tablePath) and throws TableNotExistException when the check fails. The message shows the catalog name and TablePath that could not be resolved — here the fields render as null because the TablePath was built without database/schema/table identifiers.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/AbstractJdbcCatalog.java:219
throw new UnsupportedOperationException();
}
protected Column buildColumn(ResultSet resultSet) throws SQLException {
throw new UnsupportedOperationException();
}
protected TableIdentifier getTableIdentifier(TablePath tablePath) {
return TableIdentifier.of(
catalogName,
tablePath.getDatabaseName(),
tablePath.getSchemaName(),
tablePath.getTableName());
}
public CatalogTable getTable(TablePath tablePath)
throws CatalogException, TableNotExistException {
if (!tableExists(tablePath)) {
throw new TableNotExistException(catalogName, tablePath);
}
String dbUrl;
if (StringUtils.isNotBlank(tablePath.getDatabaseName())) {
dbUrl = getUrlFromDatabaseName(tablePath.getDatabaseName());
} else {
dbUrl = getUrlFromDatabaseName(defaultDatabase);
}
Connection conn = getConnection(dbUrl);
try {
DatabaseMetaData metaData = conn.getMetaData();
Optional<String> comment = getTableComment(metaData, tablePath);
Optional<PrimaryKey> primaryKey = getPrimaryKey(metaData, tablePath);
List<ConstraintKey> constraintKeys = getConstraintKeys(metaData, tablePath);
TableSchema.Builder tableSchemaBuilder =
buildColumnsReturnTablaSchemaBuilder(tablePath, conn);
// add primary key
primaryKey.ifPresent(tableSchemaBuilder::primaryKey);View on GitHub (pinned to cf67b549a7)
Solutions
- Pass a fully qualified TablePath (database.schema.table as applicable) with exact-case identifiers.
- Verify the table exists: run the catalog's listTables/tableExists for the intended database.
- Check for case-sensitivity and whitespace in the configured table name.
- Ensure the catalog URL/username has access to the database containing the table.
Example fix
// before
TablePath path = TablePath.of(null, null, null);
// after
TablePath path = TablePath.of("mydb", "public", "orders"); Defensive patterns
Strategy: validation
Validate before calling
TablePath p = TablePath.of(db, schema, table); if (p.getDatabaseName() == null || p.getTableName() == null) throw new IllegalArgumentException("TablePath must be fully qualified"); Try / catch
catch (TableNotExistException e) { log.error("Table {} missing in catalog {}", e.tablePath(), e.catalogName()); /* create table or fix config */ } Prevention
- Always pass fully qualified, correctly-cased table identifiers
- Verify table existence with listTables before syncing
- Watch for case sensitivity in identifier names
When it happens
Trigger: getTable(tablePath) is called (directly or via getCatalogTable/tableOfQuery) with a TablePath whose databaseName/schemaName/tableName are null or not present in the catalog, so tableExists() returns false.
Common situations: Table name not fully qualified (missing database/schema parts); typo in table or database name; case-sensitivity mismatch (lower/upper case identifiers); querying a table before the connector's catalog was pointed at the right database.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- table {} not exist when get the database catalog table
- CONNECT_FAILED
- TableNotExistException: catalogName, tablePath
- Failed executeSql error %s
- Table ${tablePath} does not exist in catalog hive
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/490d298a27424206.
Report an issue: GitHub.