flowable/flowable-engine · error · FlowableObjectNotFoundException
Could not find a resource with name
Error message
Could not find a resource with name '${resourceName}' in deployment '${deploymentId}'. What it means
FlowableObjectNotFoundException thrown when the deployment exists but contains no resource with the requested name. The resource existence check against the deployment's resource list failed before any stream was opened.
Solutions
- List the deployment's resources via GET /event-registry-repository/deployments/{deploymentId}/resources and use an exact name from that list.
- Match case and path exactly; resource names include the full path as deployed.
- Point at the correct deployment version that actually contains the resource.
Example fix
// before
String name = "events/order-event.json"; // deployed as 'order-event.json'
// after
List<EventResource> res = repositoryService.getDeploymentResources(deploymentId);
String name = res.stream().map(EventResource::getName).filter(n -> n.endsWith("order-event.json")).findFirst().get(); Defensive patterns
Strategy: validation
Validate before calling
boolean exists = repositoryService.getDeploymentResources(deploymentId).stream().anyMatch(r -> r.getName().equals(resourceName));
Try / catch
try { ... } catch (FlowableObjectNotFoundException e) { return ResponseEntity.status(404).body("resource not in deployment"); } Prevention
- Always list resources for the deployment before fetching data
- Match resource names case- and path-exactly
When it happens
Trigger: Requesting a resource name that was not part of the deployment, misspelled resource file names, or requesting resources of a deployment that shipped a different set of files.
Common situations: Assuming a standard resource name (e.g. 'my-event.json') that was actually deployed under a different path, case-sensitivity mismatches, or fetching from the wrong deployment version.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Could not find a resource with name
- Could not find a resource with name
- ${aonfe.getMessage()}
- Batch part with id ' ' does not have a batch part document.
- Batch with id ' ' does not have a batch document.
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/23d9a5c48222d081.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-event-registry-rest/src/main/java/org/flowable/eventregistry/rest/service/api/repository/BaseDeploymentResourceDataResource.java:78
if (restApiInterceptor != null) {
restApiInterceptor.accessDeploymentById(deployment);
}
List<String> resourceList = repositoryService.getDeploymentResourceNames(deploymentId);
if (resourceList.contains(resourceName)) {
String contentType = contentTypeResolver.resolveContentType(resourceName);
response.setContentType(contentType);
try (final InputStream resourceStream = repositoryService.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 + "'.", String.class);
}
}
}
View on GitHub (pinned to d6d39ce1c6)