flowable/flowable-engine · error · FlowableObjectNotFoundException
no resource found with name '' in deployment ''
Error message
no resource found with name '' in deployment ''
What it means
The resource query returned nothing but the deployment itself exists, so the command throws FlowableObjectNotFoundException 'no resource found with name <resourceName> in deployment <deploymentId>'. The deployment is real; the requested resource name simply is not part of it.
Source
Thrown at modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/cmd/GetDeploymentResourceCmd.java:54
this.deploymentId = deploymentId;
this.resourceName = resourceName;
}
@Override
public InputStream execute(CommandContext commandContext) {
if (deploymentId == null) {
throw new FlowableIllegalArgumentException("deploymentId is null");
}
if (resourceName == null) {
throw new FlowableIllegalArgumentException("resourceName is null");
}
EventResourceEntity resource = CommandContextUtil.getResourceEntityManager().findResourceByDeploymentIdAndResourceName(deploymentId, resourceName);
if (resource == null) {
if (CommandContextUtil.getDeploymentEntityManager(commandContext).findById(deploymentId) == null) {
throw new FlowableObjectNotFoundException("deployment does not exist: " + deploymentId);
} else {
throw new FlowableObjectNotFoundException("no resource found with name '" + resourceName + "' in deployment '" + deploymentId + "'");
}
}
return new ByteArrayInputStream(resource.getBytes());
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- List actual resource names via EventRepositoryService.getDeploymentResourceNames(deploymentId) and use one exactly
- Correct the resource name spelling/case/extension
- Redeploy including the missing resource file
Example fix
// before
InputStream is = getResource(deploymentId, "OrderEvent.json");
// after
List<String> names = eventRepositoryService.getDeploymentResourceNames(deploymentId);
String exact = names.stream().filter(n -> n.equalsIgnoreCase("OrderEvent.json")).findFirst()
.orElseThrow(() -> new FlowableObjectNotFoundException("resource missing"));
InputStream is = getResource(deploymentId, exact); Defensive patterns
Strategy: fallback
Validate before calling
List<String> names = eventRepositoryService.getDeploymentResourceNames(deploymentId);
if (!names.contains(resourceName)) throw new IllegalArgumentException("Resource " + resourceName + " not in deployment"); Type guard
boolean resourceInDeployment = eventRepositoryService.getDeploymentResourceNames(deploymentId).stream().anyMatch(n -> n.equals(resourceName));
Try / catch
try {
return getDeploymentResource(deploymentId, resourceName);
} catch (FlowableObjectNotFoundException e) {
// fallback to first available resource or rethrow
List<String> names = eventRepositoryService.getDeploymentResourceNames(deploymentId);
if (!names.isEmpty()) return getDeploymentResource(deploymentId, names.get(0));
throw e;
} Prevention
- Use getDeploymentResourceNames to confirm exact names first
- Beware case-sensitive resource name matching
- Redeploy when resource files are renamed
When it happens
Trigger: Executing GetDeploymentResourceCmd(deploymentId, wrongName) where the name differs in case, extension, or path from what was deployed (e.g. 'Model.json' vs 'model.json').
Common situations: Typo in resource name; renamed resource after an engine version upgrade; assuming resources are auto-generated names instead of the exact deployed filenames; case-sensitive DB collation differences.
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
- no resource found with name '<resourceName>' in deployment '
- Could not find event model with key '{eventDefinitionKey}'.
- no resource found with name '${resourceName}' in deployment
- No deployment found for id = '${deploymentId}'
- No deployment found for id = '${deploymentId}'
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/6992e5be9ce15c81.
Report an issue: GitHub.