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

  1. Verify the resource paths/patterns point to existing, readable files (check the packaged jar/war contents).
  2. Fix packaging so the process definitions are included in the artifact (maven/gradle resource filtering/excludes).
  3. Check filesystem permissions on the resource location.
  4. Catch ActivitiException during engine bootstrap and log/fail with the wrapped IOException cause.
  5. 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

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


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/75df1b4ab471dee9. Report an issue: GitHub.