{"record":{"id":"8db6e7cae693c3a5","repo":"risingwavelabs/risingwave","slug":"catalog-jdbc-user-must-not-be-set-when-hosted-c","errorCode":null,"errorMessage":"`catalog.jdbc.user` must not be set when `hosted_catalog` is set","messagePattern":"`catalog\\.jdbc\\.user` 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":283,"sourceCode":"        if env_var_is_true(DISABLE_DEFAULT_CREDENTIAL)\n            && matches!(common.enable_config_load, Some(true))\n        {\n            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        }","sourceCodeStart":265,"sourceCodeEnd":301,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/connector_common/connection.rs#L265-L301","documentation":"Same hosted-catalog validation block in `IcebergConnection::validate_connection`: JDBC catalog credentials must not be supplied when `hosted_catalog = true`, because hosted mode never connects to a user-specified JDBC catalog.","triggerScenarios":"Calling validate_connection where `hosted_catalog` is true AND `catalog.jdbc.user` is set.","commonSituations":"Keeping JDBC catalog credentials from a previous self-managed JDBC-catalog connection while enabling `hosted_catalog`; secrets templating that always injects `catalog.jdbc.user`.","solutions":["Remove `catalog.jdbc.user` from the connection options when `hosted_catalog = true`.","Alternatively disable `hosted_catalog` and use a fully specified JDBC catalog including user/password."],"exampleFix":"// before\nWITH (connector='iceberg', hosted_catalog=true, catalog.jdbc.user='iceberg')\n// after\nWITH (connector='iceberg', hosted_catalog=true)","handlingStrategy":"validation","validationCode":"if hosted_catalog && jdbc_user.is_some() { return Err(\"catalog.jdbc.user 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.user` must not be set\") => warn_user_and_abort(),\n    other => other,\n}","preventionTips":["Remove catalog.jdbc.user in hosted-catalog configs","Audit secret-injection templates for JDBC options","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"}