risingwavelabs/risingwave · error · iceberg::Error (ErrorKind::Unexpected)
Failed to list iceberg tables.
Error message
Failed to list iceberg tables.
What it means
`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.
Source
Thrown at src/connector/src/connector_common/iceberg/jni_catalog.rs:267
let namespace_jstr = env.new_string(&namespace_str).unwrap();
let result_json =
call_method!(env, inner.java_catalog.as_obj(), {String listTables(String)},
&namespace_jstr)
.with_context(|| {
format!("Failed to list iceberg tables in namespace: {}", namespace)
})?;
let rust_json_str = jobj_to_str(env, result_json)?;
let resp: ListTablesResponse = serde_json::from_str(&rust_json_str)?;
Ok(resp.identifiers)
})
})
.await
.map_err(|e| {
iceberg::Error::new(
iceberg::ErrorKind::Unexpected,
"Failed to list iceberg tables.",
)
.with_source(e)
})
}
async fn update_namespace(
&self,
_namespace: &NamespaceIdent,
_properties: HashMap<String, String>,
) -> iceberg::Result<()> {
todo!()
}
/// Create a new table inside the namespace.
async fn create_table(
&self,View on GitHub (pinned to 6469eb736d)
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.
Defensive patterns
Strategy: try-catch
Validate before calling
// Confirm the namespace exists before listing its tables
if !catalog.namespace_exists(&ns).await? {
return Err(format!("namespace {:?} does not exist", ns));
} Try / catch
match catalog.list_tables(&ns).await {
Err(e) => {
tracing::error!(source = ?e.source(), "list_tables failed; check namespace and permissions");
Err(e)
}
Ok(tables) => Ok(tables),
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: Listing tables in a namespace that does not exist; Glue/Hive permission errors; catalog service outage; classpath/JNI setup problems.
Related errors
- Failed to list iceberg namespaces.
- Failed to create namespace.
- Failed to check namespace exists.
- Failed to create iceberg table.
- Caught Java Exception: {}
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/681e4a1399549970.
Report an issue: GitHub.