flowable/flowable-engine · error · FlowableObjectNotFoundException
no resource found with name '<resourceName>' in deployment '
Error message
no resource found with name '<resourceName>' in deployment '<deploymentId>'
What it means
If the deployment exists but no resource row matches the given name, GetDeploymentResourceCmd throws FlowableObjectNotFoundException "no resource found with name '<name>' in deployment '<id>'". This is the both-parameters-valid-but-name-mismatch case, distinct from the missing-deployment case.
Source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/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");
}
DmnResourceEntity 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
- Call dmnRepositoryService.getDeploymentResourceNames(deploymentId) and use an exact returned name
- Fix the case/extension to match the deployed resource exactly (lookup is exact-match)
- Prefer querying the resource entity (createResourceQuery? / resource query by deployment) rather than guessing the name, or key off DmnDeploymentEntity resource metadata
Example fix
// before
repoService.getDeploymentResource(deploymentId, "OrderApproval.dmn"); // actual: order-approval.dmn
// after
List<String> names = repoService.getDeploymentResourceNames(deploymentId);
String name = names.stream().filter(n -> n.endsWith(".dmn")).findFirst().orElseThrow();
repoService.getDeploymentResource(deploymentId, name); Defensive patterns
Strategy: try-catch
Validate before calling
List<String> names = repoService.getDeploymentResourceNames(deploymentId); if (!names.contains(resourceName)) throw new NotFoundException(resourceName + " not in deployment " + deploymentId + "; available: " + names);
Try / catch
try { return repoService.getDeploymentResource(depId, name); } catch (FlowableObjectNotFoundException e) { if (e.getMessage().startsWith("no resource found with name")) { log.warn("resource {} missing in deployment {}", name, depId); return ResponseEntity.notFound().build(); } throw e; } Prevention
- List resource names dynamically instead of assuming file names
- Match name case and extension exactly; Linux is case-sensitive
- Update lookup constants whenever a DMN file is renamed, ideally within the same commit/release
When it happens
Trigger: getDeploymentResource(deploymentId, "wrong.dmn") where the deployment exists but contains a differently named resource — the resource was renamed between versions, the name's letter case differs, or the deployment contains a different .dmn file set.
Common situations: Renaming a DMN XML file without updating the code that fetches it by name; OS/build pipeline differing in file naming (case-sensitive Linux vs Windows); fetching by name when multiple deployments contain same-named files with different ids.
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
- Cannot find case definition for id:
- Required decision <decisionId> is not available
- No decision found for key <decisionKey>. There was also no f
- No decision found for key <decisionKey>. There was also no f
- resourceName is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/942e1c988afe9de6.
Report an issue: GitHub.