apache/seatunnel · error · CatalogException
Failed creating table {tablePath.getFullName()}
Error message
Failed creating table {tablePath.getFullName()} What it means
createTableInternal wraps any exception during execution of the generated CREATE TABLE (and optional index) DDL into a CatalogException 'Failed creating table {fullName}'. This is a DDL execution failure, not a validation failure.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/AbstractJdbcCatalog.java:510
throw new UnsupportedOperationException();
}
protected List<String> getCreateTableSqls(
TablePath tablePath, CatalogTable table, boolean createIndex) {
return Collections.singletonList(getCreateTableSql(tablePath, table, createIndex));
}
protected void createTableInternal(TablePath tablePath, CatalogTable table, boolean createIndex)
throws CatalogException {
String dbUrl = getUrlFromDatabaseName(tablePath.getDatabaseName());
try {
final List<String> createTableSqlList =
getCreateTableSqls(tablePath, table, createIndex);
for (String sql : createTableSqlList) {
executeInternal(dbUrl, sql);
}
} catch (Exception e) {
throw new CatalogException(
String.format("Failed creating table %s", tablePath.getFullName()), e);
}
}
@Override
public void dropTable(TablePath tablePath, boolean ignoreIfNotExists)
throws TableNotExistException, CatalogException {
checkNotNull(tablePath, "Table path cannot be null");
if (!tableExists(tablePath)) {
if (ignoreIfNotExists) {
return;
}
throw new TableNotExistException(catalogName, tablePath);
}
dropTableInternal(tablePath);
}View on GitHub (pinned to cf67b549a7)
Solutions
- Read the wrapped cause for the server's DDL error (syntax/type/permission)
- Check that the JDBC catalog dialect supports your target database version
- Verify column types in your CatalogTable map to legal types on the target DB
- Grant CREATE privileges to the catalog user and retry
- Handle the race case by catching the exception and checking tableExists()
Example fix
// before
catalog.createTable(path, table, false); // opaque failure
// after
try {
catalog.createTable(path, table, false);
} catch (CatalogException e) {
LOG.error("create table DDL failed for {}", path.getFullName(), e.getCause());
} Defensive patterns
Strategy: try-catch
Validate before calling
// validate types are supported before DDL
table.getTableSchema().getColumns().forEach(c ->
LOG.info("column {} type {}", c.getName(), c.getSourceType())); Try / catch
try {
catalog.createTable(path, table, ignoreIfExists);
} catch (CatalogException e) {
LOG.error("DDL failed for {}", path.getFullName(), e.getCause());
throw e;
} Prevention
- Review the cause for server-side DDL errors before changing config
- Ensure the catalog user has CREATE privilege
- Confirm the dialect supports your DB version and column types
- Expect races: on failure, re-check tableExists() before retrying
When it happens
Trigger: Calling createTable() when executeInternal fails on the DDL: syntax unsupported by the target dialect, invalid column types in the CatalogTable, insufficient privileges, connection loss, or table concurrently created (race).
Common situations: SeaTunnel type mapping produces types the target DB rejects; user lacks CREATE privilege; strict-mode servers reject unsupported DDL options; network drop mid-DDL.
Related errors
- Table 'TablePath{databaseName='null', schemaName='null', tab
- Failed EXECUTE SQL in catalog %s
- Unsupported action type:
- CONNECT_FAILED
- TableAlreadyExistException: catalogName, tablePath
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/3aab2a6bbf2bf1d0.
Report an issue: GitHub.