flowable/flowable-engine · error · ActivitiObjectNotFoundException
no resource found with name
Error message
no resource found with name '<resourceName>' in deployment '<deploymentId>'
What it means
ActivitiObjectNotFoundException thrown by DeploymentManager.getBpmnModelById when the deployment exists but the BPMN XML resource with the definition's resourceName cannot be found in that deployment. The engine looks up the resource bytes (by deploymentId + resourceName) needed to parse the BpmnModel; a missing resource means the definition's model cannot be reconstructed.
Solutions
- Redeploy the BPMN XML so the resource is stored under the name recorded on the process definition
- Check ACT_GE_BYTEARRAY for the resource bytes and restore missing rows from a backup
- If resources were renamed, update the RESOURCE_NAME_ column on ACT_RE_PROCDEF to match the stored resource
- Avoid manual manipulation of the deployment/resource tables; use the RepositoryService deployment builder
Example fix
// before (resource name mismatch on manual deploy)
repositoryService.createDeployment().addClasspathResource("process.bpmn20.xml").deploy();
// after (keep the same resource name the definition expects)
repositoryService.createDeployment().addClasspathResource("myProcess.bpmn20.xml").deploy(); Defensive patterns
Strategy: validation
Validate before calling
ProcessDefinition pd = repositoryService.createProcessDefinitionQuery().processDefinitionId(id).singleResult();
if (pd != null && repositoryService.getResourceAsStream(pd.getDeploymentId(), pd.getResourceName()) == null) {
throw new IllegalStateException("Resource missing: " + pd.getResourceName());
} Try / catch
try {
return repositoryService.getBpmnModel(pdId);
} catch (ActivitiObjectNotFoundException e) {
// redeploy or fall back to a locally parsed copy of the BPMN XML
return parseLocalBpmn(pdId);
} Prevention
- Always deploy resources via the DeploymentBuilder so names are recorded consistently
- Never manually prune ACT_GE_BYTEARRAY
- Treat deployment + resources as an atomic unit
When it happens
Trigger: Calling getBpmnModelById(processDefinitionId) where findResourceByDeploymentIdAndResourceName returns null but the deployment row itself exists — i.e., ACT_GE_BYTEARRAY has no resource row matching the definition's resourceName in that deployment.
Common situations: Deployments created programmatically with resources added under different names than recorded on the definition, manual deletion of ACT_GE_BYTEARRAY rows, or copying definition rows between databases without the byte-array resources.
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 deployment with id
- Could not find a deployment with id
- Could not find a resource with id
- Could not find a resource with name
- No deployment found for id =
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/18e647015e6cd530.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/persistence/deploy/DeploymentManager.java:130
// first try the cache
BpmnModel bpmnModel = bpmnModelCache.get(processDefinitionId);
if (bpmnModel == null) {
ProcessDefinition processDefinition = findDeployedProcessDefinitionById(processDefinitionId);
if (processDefinition == null) {
throw new ActivitiObjectNotFoundException("no deployed process definition found with id '" + processDefinitionId + "'", ProcessDefinition.class);
}
// Fetch the resource
String resourceName = processDefinition.getResourceName();
ResourceEntity resource = Context.getCommandContext().getResourceEntityManager()
.findResourceByDeploymentIdAndResourceName(processDefinition.getDeploymentId(), resourceName);
if (resource == null) {
if (Context.getCommandContext().getDeploymentEntityManager().findDeploymentById(processDefinition.getDeploymentId()) == null) {
throw new ActivitiObjectNotFoundException("deployment for process definition does not exist: "
+ processDefinition.getDeploymentId(), Deployment.class);
} else {
throw new ActivitiObjectNotFoundException("no resource found with name '" + resourceName
+ "' in deployment '" + processDefinition.getDeploymentId() + "'", InputStream.class);
}
}
// Convert the bpmn 2.0 xml to a bpmn model
BpmnXMLConverter bpmnXMLConverter = new BpmnXMLConverter();
bpmnModel = bpmnXMLConverter.convertToBpmnModel(new BytesStreamSource(resource.getBytes()), false, false);
bpmnModelCache.add(processDefinition.getId(), bpmnModel);
}
return bpmnModel;
}
public ProcessDefinition findDeployedLatestProcessDefinitionByKey(String processDefinitionKey) {
ProcessDefinition processDefinition = Context
.getCommandContext()
.getProcessDefinitionEntityManager()
.findLatestProcessDefinitionByKey(processDefinitionKey);
View on GitHub (pinned to d6d39ce1c6)