apache/seatunnel · warning
The catalog: is not supported the…
Error message
The catalog: {} is not supported the getDatabaseWithConditionSql for databaseExists What it means
AbstractJdbcCatalog.databaseExists normally checks existence via getDatabaseWithConditionSql, but if the concrete JDBC catalog does not implement that method (it throws UNSUPPORTED_METHOD), this warning is logged and the method falls back to listDatabases().contains(databaseName). The result is still correct but slower; the warning tells you the catalog lacks an optimized existence check.
Solutions
- Implement getDatabaseWithConditionSql in the concrete catalog class to provide dialect-specific existence SQL
- Ignore the warning if the fallback via listDatabases() is acceptable (correct but slower)
- Upgrade SeaTunnel to a version where your JDBC dialect implements the conditional check
- If writing a custom catalog, delegate to an appropriate system query (e.g. SELECT 1 FROM sys.databases WHERE name = ?) for your DB
Example fix
// before
@Override
protected String getDatabaseWithConditionSql(String databaseName) {
throw new SeaTunnelRuntimeException(UNSUPPORTED_METHOD, ...);
}
// after
@Override
protected String getDatabaseWithConditionSql(String databaseName) {
return "SELECT schema_name FROM information_schema.schemata WHERE schema_name = '" + databaseName + "'";
} Defensive patterns
Strategy: fallback
Validate before calling
// catalog existence via portable fallback
boolean dbExists(AbstractJdbcCatalog catalog, String db) {
try {
return catalog.databaseExists(db);
} catch (SeaTunnelRuntimeException e) {
return catalog.listDatabases().contains(db);
}
} Try / catch
try { catalog.databaseExists(name); }
catch (SeaTunnelRuntimeException e) {
if (UNSUPPORTED_METHOD.getCode().equals(e.getSeaTunnelErrorCode().getCode())) {
return catalog.listDatabases().contains(name); // portable fallback
}
throw e;
} Prevention
- Implement getDatabaseWithConditionSql in custom JDBC catalogs
- Check dialect support before relying on optimized existence checks
- Accept the listDatabases() fallback for rare dialects; note the perf cost
- Pin a SeaTunnel version where your dialect implements the conditional SQL
When it happens
Trigger: Calling databaseExists (directly or via listTables/listViews/tableExists/createTable/createDatabase/dropDatabase) on a catalog whose getDatabaseWithConditionSql is not implemented — i.e. throws SeaTunnelRuntimeException with UNSUPPORTED_METHOD code.
Common situations: Using a less-common JDBC dialect catalog that hasn't implemented the conditional-SQL API; custom catalog subclass overriding only part of AbstractJdbcCatalog; connecting to databases where the catalog name check SQL isn't portable.
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
- Catalog not found, loading tables from jdbc directly. url
- The catalog: is not supported the…
- The catalog: is not supported the getListDatabaseSql for…
- The catalog: is not supported the getTableWithConditionSql…
- COMMON-17
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/9537f299c6f301ff.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/AbstractJdbcCatalog.java:370
public List<String> listDatabases() throws CatalogException {
try {
return queryString(defaultUrl, getListDatabaseSql(), rs -> rs.getString(1));
} catch (Exception e) {
throw new CatalogException(
String.format("Failed listing database in catalog %s", this.catalogName), e);
}
}
@Override
public boolean databaseExists(String databaseName) throws CatalogException {
if (StringUtils.isBlank(databaseName)) {
return false;
}
try {
return querySQLResultExists(defaultUrl, getDatabaseWithConditionSql(databaseName));
} catch (SeaTunnelRuntimeException e) {
if (e.getSeaTunnelErrorCode().getCode().equals(UNSUPPORTED_METHOD.getCode())) {
log.warn(
"The catalog: {} is not supported the getDatabaseWithConditionSql for databaseExists",
this.catalogName);
return listDatabases().contains(databaseName);
}
throw e;
} catch (SQLException e) {
throw new SeaTunnelException("Failed to querySQLResult", e);
}
}
protected String getListTableSql(String databaseName) {
throw new UnsupportedOperationException();
}
protected String getTableWithConditionSql(TablePath tablePath) {
throw CommonError.unsupportedMethod(this.catalogName, "getTableWithConditionSql");
}
View on GitHub (pinned to cf67b549a7)