{"record":{"id":"296acfa40b6221e1","repo":"risingwavelabs/risingwave","slug":"catalog-jdbc-password-must-not-be-set-when-host","errorCode":null,"errorMessage":"`catalog.jdbc.password` must not be set when `hosted_catalog` is set","messagePattern":"`catalog\\.jdbc\\.password` must not be set when `hosted_catalog` is set","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/connector/src/connector_common/connection.rs","lineNumber":286,"sourceCode":"            bail!(\"`enable_config_load` can't be enabled in this environment\");\n        }\n\n        if common.hosted_catalog.unwrap_or(false) {\n            // If `hosted_catalog` is set, we don't need to test the catalog, but just ensure no catalog fields are set.\n            if common.catalog_type.is_some() {\n                bail!(\"`catalog.type` must not be set when `hosted_catalog` is set\");\n            }\n            if common.catalog_uri.is_some() {\n                bail!(\"`catalog.uri` must not be set when `hosted_catalog` is set\");\n            }\n            if common.catalog_name.is_some() {\n                bail!(\"`catalog.name` must not be set when `hosted_catalog` is set\");\n            }\n            if self.jdbc_user.is_some() {\n                bail!(\"`catalog.jdbc.user` must not be set when `hosted_catalog` is set\");\n            }\n            if self.jdbc_password.is_some() {\n                bail!(\"`catalog.jdbc.password` must not be set when `hosted_catalog` is set\");\n            }\n            return Ok(());\n        }\n\n        if common.catalog_type.is_none() {\n            bail!(\"`catalog.type` must be set\");\n        }\n\n        // Test catalog\n        let iceberg_common = common.clone();\n\n        let mut java_map = HashMap::new();\n        if let Some(jdbc_user) = &self.jdbc_user {\n            java_map.insert(\"jdbc.user\".to_owned(), jdbc_user.to_owned());\n        }\n        if let Some(jdbc_password) = &self.jdbc_password {\n            java_map.insert(\"jdbc.password\".to_owned(), jdbc_password.to_owned());\n        }","sourceCodeStart":268,"sourceCodeEnd":304,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/connector_common/connection.rs#L268-L304","documentation":"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.","triggerScenarios":"Calling validate_connection where `hosted_catalog` is true AND `catalog.jdbc.password` is set.","commonSituations":"Leftover `catalog.jdbc.password` from a prior JDBC-catalog connection combined with `hosted_catalog`; secrets managers that always attach the JDBC password option.","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)."],"exampleFix":"// before\nWITH (connector='iceberg', hosted_catalog=true, catalog.jdbc.password='secret')\n// after\nWITH (connector='iceberg', hosted_catalog=true)","handlingStrategy":"validation","validationCode":"if hosted_catalog && jdbc_password.is_some() { return Err(\"catalog.jdbc.password must be unset when hosted_catalog=true\"); }","typeGuard":null,"tryCatchPattern":"match validate_connection(&conn).await {\n    Err(e) if e.to_string().contains(\"`catalog.jdbc.password` must not be set\") => warn_user_and_abort(),\n    other => other,\n}","preventionTips":["Remove catalog.jdbc.password in hosted-catalog configs","Ensure secret managers do not inject JDBC credentials into hosted configs","Pre-validate connections before DDL"],"tags":["iceberg","validation","conflicting-options","jdbc"],"backgroundTag":"mutually-exclusive-options","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}