risingwavelabs/risingwave · error · anyhow::Error
`catalog.jdbc.password` must not be set when `hosted_catalog
Error message
`catalog.jdbc.password` must not be set when `hosted_catalog` is set
What it means
Same hosted-catalog validation block in `IcebergConnection::validate_connection`: the JDBC catalog password must not be supplied when `hosted_catalog = true`; it only makes sense for a self-managed JDBC catalog.
Source
Thrown at src/connector/src/connector_common/connection.rs:286
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();
if let Some(jdbc_user) = &self.jdbc_user {
java_map.insert("jdbc.user".to_owned(), jdbc_user.to_owned());
}
if let Some(jdbc_password) = &self.jdbc_password {
java_map.insert("jdbc.password".to_owned(), jdbc_password.to_owned());
}View on GitHub (pinned to 6469eb736d)
Solutions
- Remove `catalog.jdbc.password` from the connection options when `hosted_catalog = true`.
- Alternatively disable `hosted_catalog` and supply the complete JDBC catalog configuration (type, uri, user, password).
Example fix
// before WITH (connector='iceberg', hosted_catalog=true, catalog.jdbc.password='secret') // after WITH (connector='iceberg', hosted_catalog=true)
Defensive patterns
Strategy: validation
Validate before calling
if hosted_catalog && jdbc_password.is_some() { return Err("catalog.jdbc.password must be unset when hosted_catalog=true"); } Try / catch
match validate_connection(&conn).await {
Err(e) if e.to_string().contains("`catalog.jdbc.password` must not be set") => warn_user_and_abort(),
other => other,
} Prevention
- Remove catalog.jdbc.password in hosted-catalog configs
- Ensure secret managers do not inject JDBC credentials into hosted configs
- Pre-validate connections before DDL
When it happens
Trigger: Calling validate_connection where `hosted_catalog` is true AND `catalog.jdbc.password` is set.
Common situations: Leftover `catalog.jdbc.password` from a prior JDBC-catalog connection combined with `hosted_catalog`; secrets managers that always attach the JDBC password option.
Related errors
- `catalog.jdbc.user` must not be set when `hosted_catalog` is
- `catalog.type` must not be set when `hosted_catalog` is set
- `catalog.uri` must not be set when `hosted_catalog` is set
- `catalog.name` must not be set when `hosted_catalog` is set
- `warehouse.path` must be set
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/296acfa40b6221e1.
Report an issue: GitHub.