flowable/flowable-engine · error · ActivitiException
couldn't auto deploy resource '':
Error message
couldn't auto deploy resource '':
What it means
Thrown by the Spring auto-deployment strategy (ResourceParentFolderAutoDeploymentStrategy) when an IOException occurs while reading a Spring resource being auto-deployed to the Flowable/Activiti process engine. The strategy wraps resource.getInputStream() failures in an ActivitiException so deployment aborts rather than silently skipping the resource. The message interpolates the resource (here empty in the log) and the underlying IO error.
Source
Thrown at modules/flowable5-spring/src/main/java/org/activiti/spring/autodeployment/ResourceParentFolderAutoDeploymentStrategy.java:73
final Map<String, Set<Resource>> resourcesMap = createMap(resources);
for (final Entry<String, Set<Resource>> group : resourcesMap.entrySet()) {
final String deploymentName = determineDeploymentName(deploymentNameHint, group.getKey());
final DeploymentBuilder deploymentBuilder = repositoryService.createDeployment().enableDuplicateFiltering().name(deploymentName);
for (final Resource resource : group.getValue()) {
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();
}
}
private Map<String, Set<Resource>> createMap(final Resource[] resources) {
final Map<String, Set<Resource>> resourcesMap = new HashMap<>();
for (final Resource resource : resources) {
final String parentFolderName = determineGroupName(resource);
if (resourcesMap.get(parentFolderName) == null) {
resourcesMap.put(parentFolderName, new HashSet<>());
}
resourcesMap.get(parentFolderName).add(resource);
}
return resourcesMap;View on GitHub (pinned to d6d39ce1c6)
Solutions
- Verify the deploymentResources pattern in the Spring EngineConfiguration matches real, readable files (check logs for which resource failed).
- Fix filesystem permissions or restore the missing/corrupt resource file.
- If the folder may legitimately be empty or missing, change the strategy/property so empty resource sets skip deployment instead of failing.
- Rebuild/repackage the jar if the resource resides in a damaged artifact.
Example fix
// before <property name="deploymentResources" value="classpath*:/processes/*.bpmn20.xml" /> // after <!-- ensure the folder exists and pattern matches actual files --> <property name="deploymentResources" value="classpath*:/processes/*.bpmn.xml" />
Defensive patterns
Strategy: validation
Validate before calling
org.springframework.core.io.Resource[] resources = appCtx.getResources("classpath*:/processes/*.bpmn20.xml");
for (Resource r : resources) {
if (!r.exists() || !r.isReadable()) throw new IllegalStateException("Unreadable deployment resource: " + r);
} Try / catch
try { engineConfiguration.setDeploymentResources(resources); } catch (ActivitiException e) { log.error("Auto-deploy failed: {}", e.getMessage(), e); } Prevention
- Verify deployment resource patterns resolve to existing files before startup (integration test with getResources).
- Keep process resource files inside jars verified at build time.
- Avoid cleaning resource directories while the application is starting.
When it happens
Trigger: Spring context startup with process auto-deployment enabled and resource.getInputStream() throws IOException — e.g. the resource is a directory, was removed between scan and read, is unreadable due to file permissions, or lives in a jar that cannot be opened.
Common situations: applicationContext misconfiguration pointing engineConfiguration deploymentResources at a non-existent/empty folder pattern; deploying from an exploded directory that gets cleaned during build; classpath resource packaged inside a corrupt or unreadable jar; running with restricted filesystem permissions.
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
- couldn't auto deploy resource '':
- Failed to read 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/2dd195fb9cd6df39.
Report an issue: GitHub.