apache/seatunnel · warning
The catalog: is not supported the getListDatabaseSql for…
Error message
The catalog: {} is not supported the getListDatabaseSql for databaseExists What it means
KingbaseCatalog.databaseExists() probes database existence with a driver-specific getListDatabaseSql() query. If that method throws SeaTunnelRuntimeException with UNSUPPORTED_METHOD (not implemented or unsupported by the dialect), the catalog logs this warning and falls back to listing all databases via metadata and checking membership. Execution continues with the fallback result.
Solutions
- Rely on the built-in fallback; verify listDatabases() returns the database with matching case.
- Implement getListDatabaseSql() for Kingbase (e.g., SELECT datname FROM sys_database) in the catalog.
- Upgrade the SeaTunnel connector version where Kingbase support is more complete.
- Check identifier case: the fallback is case-sensitive contains(), so pass the exact database name.
Example fix
// before (base default)
protected String getListDatabaseSql() {
throw new SeaTunnelRuntimeException(UNSUPPORTED_METHOD, ...);
}
// after (Kingbase override)
@Override
protected String getListDatabaseSql() {
return "SELECT DATNAME FROM SYS_DATABASE";
} Defensive patterns
Strategy: fallback
Validate before calling
// Guard case-sensitivity before calling
String name = databaseName;
if (!catalog.listDatabases().stream().anyMatch(d -> d.equalsIgnoreCase(name))) {
throw new IllegalStateException("Database does not exist: " + name);
} Try / catch
// databaseExists handles UNSUPPORTED_METHOD internally; no extra catch needed boolean exists = catalog.databaseExists(databaseName);
Prevention
- Pass exact-case database names; the fallback contains() is case-sensitive
- Use a Kingbase driver/connector version with complete dialect support
- Treat the WARN as informational, not an error
When it happens
Trigger: Calling databaseExists(databaseName) on a KingbaseCatalog whose getListDatabaseSql() is unimplemented/unsupported, so querySQLResultExists throws UNSUPPORTED_METHOD.
Common situations: Running Kingbase catalog operations (e.g., auto table creation flows that check whether the target database exists) against Kingbase versions/drivers where the database-list query is not supported.
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
- The catalog: is not supported the…
- The catalog: is not supported the getTableWithConditionSql…
- Catalog not found, loading tables from jdbc directly. url
- 查询数据库是否存在失败:
- The catalog: is not supported the…
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/68ed645e8259cfa5.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/kingbase/KingbaseCatalog.java:151
@Override
protected String getListDatabaseSql() {
return "SELECT current_database();";
}
/**
* Override the databaseExists method because SELECT current_database() does not support WHERE
*/
@Override
public boolean databaseExists(String databaseName) throws CatalogException {
if (StringUtils.isBlank(databaseName)) {
return false;
}
try {
return querySQLResultExists(getUrlFromDatabaseName(databaseName), getListDatabaseSql());
} catch (SeaTunnelRuntimeException e) {
if (e.getSeaTunnelErrorCode().getCode().equals(UNSUPPORTED_METHOD.getCode())) {
log.warn(
"The catalog: {} is not supported the getListDatabaseSql for databaseExists",
this.catalogName);
return listDatabases().contains(databaseName);
}
throw e;
} catch (SQLException e) {
throw new CatalogException("查询数据库是否存在失败: " + databaseName, e);
}
}
@Override
protected String getCreateTableSql(
TablePath tablePath, CatalogTable table, boolean createIndex) {
return new KingbaseCreateTableSqlBuilder(table, createIndex).build(tablePath);
}
@Override
protected String getDropTableSql(TablePath tablePath) {View on GitHub (pinned to cf67b549a7)