{"record":{"id":"681e4a1399549970","repo":"risingwavelabs/risingwave","slug":"failed-to-list-iceberg-tables","errorCode":null,"errorMessage":"Failed to list iceberg  tables.","messagePattern":"Failed to list iceberg  tables\\.","errorType":"exception","errorClass":"iceberg::Error (ErrorKind::Unexpected)","httpStatus":null,"severity":"error","filePath":"src/connector/src/connector_common/iceberg/jni_catalog.rs","lineNumber":267,"sourceCode":"                let namespace_jstr = env.new_string(&namespace_str).unwrap();\n\n                let result_json =\n                    call_method!(env, inner.java_catalog.as_obj(), {String listTables(String)},\n                    &namespace_jstr)\n                    .with_context(|| {\n                        format!(\"Failed to list iceberg tables in namespace: {}\", namespace)\n                    })?;\n\n                let rust_json_str = jobj_to_str(env, result_json)?;\n\n                let resp: ListTablesResponse = serde_json::from_str(&rust_json_str)?;\n\n                Ok(resp.identifiers)\n            })\n        })\n        .await\n        .map_err(|e| {\n            iceberg::Error::new(\n                iceberg::ErrorKind::Unexpected,\n                \"Failed to list iceberg  tables.\",\n            )\n            .with_source(e)\n        })\n    }\n\n    async fn update_namespace(\n        &self,\n        _namespace: &NamespaceIdent,\n        _properties: HashMap<String, String>,\n    ) -> iceberg::Result<()> {\n        todo!()\n    }\n\n    /// Create a new table inside the namespace.\n    async fn create_table(\n        &self,","sourceCodeStart":249,"sourceCodeEnd":285,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/connector_common/iceberg/jni_catalog.rs#L249-L285","documentation":"`JniCatalog::list_tables` asks the Java catalog (via JNI) for all table identifiers in a namespace. Any failure of the call or response deserialization is wrapped as an iceberg `Unexpected` error with the message 'Failed to list iceberg  tables.' (note the double space in the message) and the original error attached as source.","triggerScenarios":"Calling list_tables on a JNI-backed catalog when the JVM call fails, the Java catalog raises an exception (unknown namespace, permissions), or the returned JSON cannot be parsed.","commonSituations":"Listing tables in a namespace that does not exist; Glue/Hive permission errors; catalog service outage; classpath/JNI setup problems.","solutions":["Check the wrapped source error for the underlying Java exception.","Verify the namespace exists and you have permission to list its tables.","Confirm catalog credentials/endpoint configuration.","Retry once the catalog backend is reachable."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Confirm the namespace exists before listing its tables\nif !catalog.namespace_exists(&ns).await? {\n    return Err(format!(\"namespace {:?} does not exist\", ns));\n}","typeGuard":null,"tryCatchPattern":"match catalog.list_tables(&ns).await {\n    Err(e) => {\n        tracing::error!(source = ?e.source(), \"list_tables failed; check namespace and permissions\");\n        Err(e)\n    }\n    Ok(tables) => Ok(tables),\n}","preventionTips":["Verify namespace existence and list permissions first.","Keep catalog credentials and endpoint configuration current.","Log the error source chain to expose the Java-side cause."],"tags":["iceberg","jni","java","tables"],"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"}