apache/seatunnel · error · CatalogException
check database exists failed
Error message
check database exists failed
What it means
DorisCatalog.databaseExists wraps SQLException from the database-existence query into CatalogException('check database exists failed'); the check itself failed due to connection loss or SQL errors, distinct from the database simply not existing.
Solutions
- Check JDBC connection health and reconnect (stale connections after idle timeout)
- Look at FE audit logs for the failing query
- Verify the configured user has permission to list databases
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/catalog/DorisCatalog.java:187 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/dfc051acb9c44925.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/catalog/DorisCatalog.java:187
@Override
public String name() {
return catalogName;
}
@Override
public String getDefaultDatabase() throws CatalogException {
return defaultDatabase;
}
@Override
public boolean databaseExists(String databaseName) throws CatalogException {
try (PreparedStatement ps = conn.prepareStatement(DorisCatalogUtil.DATABASE_QUERY)) {
ps.setString(1, databaseName);
try (ResultSet rs = ps.executeQuery()) {
return rs.next();
}
} catch (SQLException e) {
throw new CatalogException("check database exists failed", e);
}
}
@Override
public List<String> listDatabases() throws CatalogException {
List<String> databases = new ArrayList<>();
try (PreparedStatement ps = conn.prepareStatement(DorisCatalogUtil.ALL_DATABASES_QUERY);
ResultSet rs = ps.executeQuery()) {
while (rs.next()) {
String database = rs.getString(1);
databases.add(database);
}
} catch (SQLException e) {
throw new CatalogException("list databases failed", e);
}
Collections.sort(databases);
return databases;
}View on GitHub (pinned to cf67b549a7)