flowable/flowable-engine · error · ActivitiException
couldn't auto deploy resource '':
Error message
couldn't auto deploy resource '':
What it means
Thrown by DefaultAutoDeploymentStrategy.deployResources when reading a classpath resource designated for auto-deployment fails with an IOException. The resource name and IO error message are wrapped in an ActivitiException and the deployment aborts.
Source
Thrown at modules/flowable5-spring/src/main/java/org/activiti/spring/autodeployment/DefaultAutoDeploymentStrategy.java:58
@Override
public void deployResources(final String deploymentNameHint, final Resource[] resources, final RepositoryService repositoryService) {
// Create a single deployment for all resources using the name hint as
// the literal name
final DeploymentBuilder deploymentBuilder = repositoryService.createDeployment().enableDuplicateFiltering().name(deploymentNameHint);
for (final Resource resource : resources) {
final String resourceName = determineResourceName(resource);
try {
if (resourceName.endsWith(".bar") || resourceName.endsWith(".zip") || resourceName.endsWith(".jar")) {
deploymentBuilder.addZipInputStream(new ZipInputStream(resource.getInputStream()));
} else {
deploymentBuilder.addInputStream(resourceName, resource.getInputStream());
}
} catch (IOException e) {
throw new ActivitiException("couldn't auto deploy resource '" + resource + "': " + e.getMessage(), e);
}
}
deploymentBuilder.deploy();
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Verify the resource paths/patterns point to existing, readable files (check the packaged jar/war contents).
- Fix packaging so the process definitions are included in the artifact (maven/gradle resource filtering/excludes).
- Check filesystem permissions on the resource location.
- Catch ActivitiException during engine bootstrap and log/fail with the wrapped IOException cause.
- Use Spring's ResourceLoader abstraction correctly (classpath*: patterns) when assembling DeploymentResources.
Example fix
// before
cfg.setDeploymentResources(new Resource[]{ new FileSystemResource("processes/order.bpmn") }); // missing on server
// after
cfg.setDeploymentResources(new Resource[]{ new ClassPathResource("processes/order.bpmn") }); Defensive patterns
Strategy: try-catch
Validate before calling
for (Resource r : deploymentResources) {
if (!r.exists() || !r.isReadable()) throw new IllegalStateException("Auto-deploy resource missing/unreadable: " + r);
} Try / catch
try { buildEngine(); } catch (ActivitiException e) { log.error("Auto-deployment failed: {}", e.getCause(), e); throw e; } Prevention
- Verify resource patterns resolve to packaged files (jar tf ...) before deployment
- Include .bpmn/.bar files in build resources configuration
- Prefer classpath resources over filesystem paths in packaged apps
- Validate resources at startup with a smoke test
When it happens
Trigger: processEngineConfiguration.setDeploymentResources(...) containing a Spring Resource whose getInputStream() fails at startup — e.g. missing file inside a JAR/WAR, unreadable path, or a directory instead of a file.
Common situations: Moved/renamed .bpmn/.bar files under the configured deployment folder; fat-jar packaging changes breaking classpath resource resolution; file permissions; typo in the resource pattern.
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
- Failed to read resource
- couldn't auto deploy resource '':
- couldn't auto deploy resource '':
- problem retrieving flowable-cmmn-context.xml resources on th
- Failed to read resource " + resource
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/75df1b4ab471dee9.
Report an issue: GitHub.