flowable/flowable-engine · error · FlowableException
Error converting resource stream
Error message
Error converting resource stream
What it means
When the named resource exists, getDmnDeploymentResourceData streams it via dmnRepositoryService.getResourceAsStream(deploymentId, resourceName) and converts with IOUtils.toByteArray; any failure is wrapped as FlowableException("Error converting resource stream", e). This is an I/O or engine-level failure while reading the resource bytes, not a lookup miss.
Source
Thrown at modules/flowable-dmn-rest/src/main/java/org/flowable/dmn/rest/service/api/repository/BaseDmnDeploymentResourceDataResource.java:75
DmnDeployment deployment = deploymentQuery.singleResult();
if (deployment == null) {
throw new FlowableObjectNotFoundException("Could not find a DMN deployment with id '" + deploymentId);
}
if (restApiInterceptor != null) {
restApiInterceptor.accessDeploymentById(deployment);
}
List<String> resourceList = dmnRepositoryService.getDeploymentResourceNames(deploymentId);
if (resourceList.contains(resourceName)) {
String contentType = contentTypeResolver.resolveContentType(resourceName);
response.setContentType(contentType);
try (final InputStream resourceStream = dmnRepositoryService.getResourceAsStream(deploymentId, resourceName)) {
return IOUtils.toByteArray(resourceStream);
} catch (Exception e) {
throw new FlowableException("Error converting resource stream", e);
}
} else {
// Resource not found in deployment
throw new FlowableObjectNotFoundException("Could not find a resource with name '" + resourceName + "' in deployment '" + deploymentId);
}
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Inspect and log the chained cause (e.getCause()) to find the underlying SQL/IO failure.
- Retry the request after verifying database and connection-pool health.
- If the stored byte array is corrupted, redeploy the DMN deployment to regenerate it.
- Raise JDBC/network read timeouts for large resources.
Example fix
// before
byte[] data = resourceData.getDmnDeploymentResourceData(deploymentId, name, response); // throws
// after
try {
byte[] data = resourceData.getDmnDeploymentResourceData(deploymentId, name, response);
} catch (FlowableException e) {
logger.warn("Stream read failed, cause:", e.getCause());
data = retry(() -> resourceData.getDmnDeploymentResourceData(deploymentId, name, response), 2);
} Defensive patterns
Strategy: retry
Try / catch
try {
return client.getDmnDeploymentResourceData(deploymentId, resourceName);
} catch (FlowableException e) {
logger.warn("cause:", e.getCause());
return retryWithBackoff(() -> client.getDmnDeploymentResourceData(deploymentId, resourceName), 2);
} Prevention
- Inspect e.getCause() to diagnose the underlying IO/SQL error
- Keep DB connection pools healthy; alert on saturation
- Redeploy deployments whose blob rows are suspected corrupt
When it happens
Trigger: getResourceAsStream succeeds in lookup but the read/convert fails: DB blob (ACT_GEBYTEARRAY) read error, connection drop mid-stream, IOException from IOUtils.toByteArray, or a FlowableException from the repository service.
Common situations: Transient database outages or pool exhaustion; corrupted byte-array rows after failed/partial deploys or migrations; very large DMN resources hitting read timeouts; network instability between app and DB.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- Error converting resource stream
- Error converting resource stream
- could not get byte array from resource '${resourceName}'
- Error reading image stream
- Error while reading process diagram image.
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/61d97e2a78e14616.
Report an issue: GitHub.