{"record":{"id":"053ab26d769df625","repo":"risingwavelabs/risingwave","slug":"failed-to-list-iceberg-namespaces","errorCode":null,"errorMessage":"Failed to list iceberg namespaces.","messagePattern":"Failed to list iceberg namespaces\\.","errorType":"exception","errorClass":"iceberg::Error (ErrorKind::Unexpected)","httpStatus":null,"severity":"error","filePath":"src/connector/src/connector_common/iceberg/jni_catalog.rs","lineNumber":167,"sourceCode":"        _parent: Option<&NamespaceIdent>,\n    ) -> iceberg::Result<Vec<NamespaceIdent>> {\n        let inner = self.inner.clone();\n        execute_blocking_jni(move || {\n            execute_with_jni_env(inner.jvm, |env| {\n                let result_json =\n                    call_method!(env, inner.java_catalog.as_obj(), {String listNamespaces()})\n                        .with_context(|| \"Failed to list iceberg namespaces\".to_owned())?;\n\n                let rust_json_str = jobj_to_str(env, result_json)?;\n\n                let resp: ListNamespacesResponse = serde_json::from_str(&rust_json_str)?;\n\n                Ok(resp.namespaces)\n            })\n        })\n        .await\n        .map_err(|e| {\n            iceberg::Error::new(\n                iceberg::ErrorKind::Unexpected,\n                \"Failed to list iceberg namespaces.\",\n            )\n            .with_source(e)\n        })\n    }\n\n    /// Create a new namespace inside the catalog.\n    async fn create_namespace(\n        &self,\n        namespace: &iceberg::NamespaceIdent,\n        _properties: HashMap<String, String>,\n    ) -> iceberg::Result<iceberg::Namespace> {\n        let inner = self.inner.clone();\n        let namespace = namespace.clone();\n        execute_blocking_jni(move || {\n            execute_with_jni_env(inner.jvm, |env| {\n                let namespace_str = namespace_to_string(&namespace);","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/connector_common/iceberg/jni_catalog.rs#L149-L185","documentation":"`JniCatalog::list_namespaces` delegates the namespace listing to a JVM catalog via JNI and awaits the result on a Tokio runtime. Any failure of the JNI call, the Java-side request, or the response parsing is wrapped as an iceberg `Unexpected` error with the message 'Failed to list iceberg namespaces.' and the original error attached as source.","triggerScenarios":"Calling list_namespaces on a JNI-backed Iceberg catalog when the JVM call fails (Java exception, IPC failure, malformed response JSON).","commonSituations":"Iceberg catalog backend (Glue/Hadoop/REST via Java) unreachable or misconfigured; missing JVM/JNI classes on the classpath; authentication failure against the catalog service.","solutions":["Inspect the wrapped source error (`with_source`) for the underlying Java exception.","Verify catalog credentials, endpoint and region in the connection config.","Ensure the JVM classpath/JNI runtime is correctly provisioned for the chosen catalog backend.","Retry once the catalog service is reachable."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Before listing namespaces, probe catalog connectivity (e.g. HTTP HEAD for REST catalogs)\n// and verify JVM/JNI classpath is present.\nasync fn catalog_reachable(endpoint: &str) -> bool {\n    reqwest::Client::new().head(endpoint).send().await.map(|r| r.status().is_success()).unwrap_or(false)\n}","typeGuard":null,"tryCatchPattern":"// Rust: unwrap the iceberg error chain to log the Java cause\nmatch catalog.list_namespaces(ns).await {\n    Err(e) if e.kind() == iceberg::ErrorKind::Unexpected => {\n        tracing::error!(source = ?e.source(), \"JNI list_namespaces failed; check catalog service/JVM setup\");\n        // backoff and retry\n    }\n    other => other?,\n}","preventionTips":["Pre-flight check catalog endpoint and credentials.","Ensure the JVM/JNI runtime and backend-specific classes are installed.","Apply bounded exponential backoff for transient catalog outages."],"tags":["iceberg","jni","java","catalog"],"backgroundTag":"upstream-api-error","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"}