risingwavelabs/risingwave · error · ConnectorError

`catalog.name` must not be set when `hosted_catalog` is set

Error message

`catalog.name` must not be set when `hosted_catalog` is set

What it means

Same hosted-catalog validation block in `IcebergConnection::validate_connection`: `catalog.name` identifies a self-managed catalog and therefore conflicts with `hosted_catalog = true`, which relies on the platform-managed catalog.

Source

Thrown at src/connector/src/connector_common/connection.rs:280

            }
        }

        if env_var_is_true(DISABLE_DEFAULT_CREDENTIAL)
            && matches!(common.enable_config_load, Some(true))
        {
            bail!("`enable_config_load` can't be enabled in this environment");
        }

        if common.hosted_catalog.unwrap_or(false) {
            // If `hosted_catalog` is set, we don't need to test the catalog, but just ensure no catalog fields are set.
            if common.catalog_type.is_some() {
                bail!("`catalog.type` must not be set when `hosted_catalog` is set");
            }
            if common.catalog_uri.is_some() {
                bail!("`catalog.uri` must not be set when `hosted_catalog` is set");
            }
            if common.catalog_name.is_some() {
                bail!("`catalog.name` must not be set when `hosted_catalog` is set");
            }
            if self.jdbc_user.is_some() {
                bail!("`catalog.jdbc.user` must not be set when `hosted_catalog` is set");
            }
            if self.jdbc_password.is_some() {
                bail!("`catalog.jdbc.password` must not be set when `hosted_catalog` is set");
            }
            return Ok(());
        }

        if common.catalog_type.is_none() {
            bail!("`catalog.type` must be set");
        }

        // Test catalog
        let iceberg_common = common.clone();

        let mut java_map = HashMap::new();

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Remove `catalog.name` from the connection options when `hosted_catalog = true`.
  2. Alternatively turn off `hosted_catalog` and configure the named catalog explicitly.

Example fix

// before
WITH (connector='iceberg', hosted_catalog=true, catalog.name='glue_catalog')
// after
WITH (connector='iceberg', hosted_catalog=true)
Defensive patterns

Strategy: validation

Validate before calling

if hosted_catalog && catalog_name.is_some() { return Err("catalog.name must be unset when hosted_catalog=true"); }

Try / catch

match validate_connection(&conn).await {
    Err(e) if e.to_string().contains("`catalog.name` must not be set") => warn_user_and_abort(),
    other => other,
}

Prevention

When it happens

Trigger: Calling validate_connection where `hosted_catalog` is true AND `catalog.name` is set (e.g. a Hive metastore or Glue catalog name).

Common situations: Carrying over `catalog.name` from a Glue/Hive catalog setup while switching to hosted_catalog mode; templated configs that always emit `catalog.name`.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/520323ab94922f71. Report an issue: GitHub.