apache/seatunnel · error · SeaTunnelException

Not supported for list databases for iris

Error message

Not supported for list databases for iris

What it means

IrisCatalog.databaseExists always throws SeaTunnelException because the InterSystems IRIS catalog does not support enumerating/listing databases. Any code path that checks whether a database exists is unconditionally unsupported for this catalog.

Source

Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/iris/IrisCatalog.java:139

                        .dataType(typeName)
                        .length(columnLength)
                        .precision(columnPrecision)
                        .scale(columnScale)
                        .nullable(isNullable)
                        .defaultValue(defaultValue)
                        .comment(columnComment)
                        .build();
        return IrisTypeConverter.INSTANCE.convert(typeDefine);
    }

    @Override
    protected String getOptionTableName(TablePath tablePath) {
        return tablePath.getSchemaAndTableName();
    }

    @Override
    public boolean databaseExists(String databaseName) throws CatalogException {
        throw new SeaTunnelException("Not supported for list databases for iris");
    }

    @Override
    public boolean tableExists(TablePath tablePath) throws CatalogException {
        try {
            return querySQLResultExists(
                    this.getUrlFromDatabaseName(tablePath.getDatabaseName()),
                    getTableWithConditionSql(tablePath));
        } catch (SQLException e) {
            throw new SeaTunnelException("Failed to querySQLResult", e);
        }
    }

    @Override
    protected String getTableWithConditionSql(TablePath tablePath) {
        return String.format(
                getListTableSql(tablePath.getSchemaName()) + " and TABLE_NAME = '%s'",
                tablePath.getTableName());

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Do not call databaseExists on IrisCatalog; treat every table as belonging to the default database
  2. Use tableExists(TablePath) instead to check specific table availability
  3. Override databaseExists in a custom IRIS catalog subclass with a no-op returning true or a supported query
  4. If database isolation is required, use a catalog for a database that supports listing (e.g. MySQL/PostgreSQL)

Example fix

// before
if (catalog.databaseExists(dbName)) { ... }
// after
if (catalog.tableExists(TablePath.of(dbName, tableName))) { ... }
Defensive patterns

Strategy: fallback

Validate before calling

if (catalog instanceof IrisCatalog) {
    // databaseExists unsupported; use tableExists instead
}

Try / catch

try {
    return catalog.databaseExists(dbName);
} catch (SeaTunnelException e) {
    LOG.warn("databaseExists unsupported for IRIS; falling back to tableExists");
    return catalog.tableExists(TablePath.of(dbName, defaultTable));
}

Prevention

When it happens

Trigger: Calling catalog.databaseExists(name) directly, or any framework code that probes database existence before operations (e.g. createTable pre-checks, catalog validation).

Common situations: Using IRIS with code paths written for MySQL/PostgreSQL-style catalogs that call databaseExists; auto-creation logic checking database existence before creating tables; schema-sync tooling that enumerates databases.

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


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/2e6e3ec2ea9b32d8. Report an issue: GitHub.