risingwavelabs/risingwave · error · BindingError::Storage
StorageError {error}
Error message
StorageError {error} What it means
BindingError::Storage wraps an anyhow::Error raised by RisingWave storage code (Hummock state store, object store access) invoked through the JNI binding layer. It is displayed as 'StorageError {error}'. It surfaces whenever a JVM-exposed entry point initializes or touches the state/object store and the underlying storage operation fails for any reason (bad URL, unreachable endpoint, IO failure). execute_and_catch converts it into a thrown Java exception.
Source
Thrown at src/jni_core/src/lib.rs:91
macro_rules! enable {
() => {
use risingwave_jni_core as _;
};
}
pub static JAVA_BINDING_ASYNC_RUNTIME: LazyLock<Runtime> =
LazyLock::new(|| tokio::runtime::Runtime::new().unwrap());
#[derive(Error, Debug)]
pub enum BindingError {
#[error("JniError {error}")]
Jni {
#[from]
error: jni::errors::Error,
backtrace: Backtrace,
},
#[error("StorageError {error}")]
Storage {
#[from]
error: anyhow::Error,
backtrace: Backtrace,
},
#[error("DecodeError {error}")]
Decode {
#[from]
error: DecodeError,
backtrace: Backtrace,
},
#[error("StreamChunkArrayError {error}")]
StreamChunkArray {
#[from]
error: ArrayError,
backtrace: Backtrace,View on GitHub (pinned to 6469eb736d)
Solutions
- Read the wrapped anyhow error message in the thrown Java exception — it contains the underlying storage failure (bad URL, connection refused, credentials)
- Verify the state store URL scheme and endpoint are correct and the object store service is reachable from the process
- For S3/MinIO, check credentials and region configuration before calling the binding
- Use initObjectStoreForTest only with a supported hummock URL format (memory://, s3://, minio://)
Example fix
// before
Binding.initObjectStoreForTest("s3://bad-bucket", "/data"); // StorageError: endpoint unreachable
// after
Binding.initObjectStoreForTest("memory", "/tmp/rw-test-data"); // or verify S3 endpoint/creds first Defensive patterns
Strategy: try-catch
Validate before calling
// Java, before initObjectStoreForTest
if (url == null || url.isEmpty()) throw new IllegalArgumentException("state_store_url required");
if (!(url.startsWith("memory") || url.startsWith("s3://") || url.startsWith("minio://")))
throw new IllegalArgumentException("unsupported state store url: " + url); Try / catch
try {
Binding.initObjectStoreForTest(url, dir);
} catch (RuntimeException e) {
if (e.getMessage().contains("StorageError")) {
// log full report: contains underlying object-store cause (creds/endpoint/IO)
}
throw e;
} Prevention
- Validate state store URL scheme/endpoint before initialization
- Ensure the object store service (MinIO/S3) is reachable and credentials are set
- Prefer "memory" state store for pure unit tests
- Give the data directory a writable, existing path
When it happens
Trigger: Calling binding entry points that initialize the object store or read/write via Hummock (e.g. initObjectStoreForTest, Hummock read/write JNI methods) with a bad state_store_url, unreachable object store endpoint, or failing storage IO operation.
Common situations: Passing an unsupported or malformed state store URL (e.g. wrong s3:// bucket, missing minio endpoint) from Java; object store credentials missing or wrong; MinIO/S3 not running in the test environment; data directory invalid.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- Storage error: {0}
- ObjectStore failed with IO error: {0}
- SstableUpload error: {0}
- Read backup error: {0}
- check if version hint exist failed: {}
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/f6ccdb848384905b.
Report an issue: GitHub.