flowable/flowable-engine · error · ActivitiException

couldn't auto deploy resource '':

Error message

couldn't auto deploy resource '': 

What it means

Thrown by SingleResourceAutoDeploymentStrategy when reading the single Spring resource to auto-deploy fails with an IOException. The strategy deploys exactly one resource (e.g. a .bpmn20.xml, .bar or .zip) at engine startup; an unreadable stream is wrapped in an ActivitiException to fail startup loudly.

Source

Thrown at modules/flowable5-spring/src/main/java/org/activiti/spring/autodeployment/SingleResourceAutoDeploymentStrategy.java:59

    @Override
    public void deployResources(final String deploymentNameHint, final Resource[] resources, final RepositoryService repositoryService) {

        // Create a separate deployment for each resource using the resource
        // name

        for (final Resource resource : resources) {

            final String resourceName = determineResourceName(resource);
            final DeploymentBuilder deploymentBuilder = repositoryService.createDeployment().enableDuplicateFiltering().name(resourceName);

            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. Check that the configured resource path exists and is readable from the application's working directory/classpath.
  2. Fix file permissions or restore the deleted resource.
  3. Validate the artifact (jar/war) containing the resource and rebuild it.
  4. If the resource is optional, remove it from deploymentResources or switch to a strategy that tolerates absence.

Example fix

// before
<property name="deploymentResources" value="classpath:/processes/order.bpmn20.xml" /> <!-- file missing -->
// after
<property name="deploymentResources" value="classpath:/processes/order-process.bpmn20.xml" /> <!-- correct path -->
Defensive patterns

Strategy: validation

Validate before calling

Resource r = new ClassPathResource("processes/order-process.bpmn20.xml");
if (!r.exists() || !r.isReadable()) throw new IllegalStateException("Deployment resource missing/unreadable: " + r);

Try / catch

try { startEngine(); } catch (ActivitiException e) { log.error("Single-resource auto deploy failed: {}", e.getMessage(), e); }

Prevention

When it happens

Trigger: deployResources called during Spring context startup for one resource whose getInputStream() throws IOException — deleted file, permission issue, unreadable jar entry, or broken resource handle.

Common situations: A single explicitly configured process resource path is wrong or the file was moved; CI containers mount the resource directory after startup began; fat-jar repackaging left a stale classpath entry.

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/eb649157f7756bd4. Report an issue: GitHub.