flowable/flowable-engine · error · UncheckedIOException

Failed to find resources for ${path}

Error message

Failed to find resources for ${path}

What it means

BaseAutoDeployResourceContribution.applyTo scans configured classpath locations (e.g. processes/ or cmmn/) for deployable resources when generating AOT runtime hints for native images. If reading the classpath resource tree throws IOException, it wraps it in UncheckedIOException 'Failed to find resources for <path>'. It means the AOT processing could not enumerate/process the auto-deploy resource folder.

Source

Thrown at modules/flowable-spring-boot/flowable-spring-boot-starters/flowable-spring-boot-autoconfigure/src/main/java/org/flowable/spring/boot/aot/BaseAutoDeployResourceContribution.java:61

        this.locationPrefix = locationPrefix;
        this.locationSuffixes = locationSuffixes;
    }

    @Override
    public void applyTo(GenerationContext generationContext, BeanFactoryInitializationCode beanFactoryInitializationCode) {
        RuntimeHints runtimeHints = generationContext.getRuntimeHints();
        for (String locationSuffix : locationSuffixes) {
            String path = locationPrefix + locationSuffix;
            try {
                for (Resource resource : resolver.getResources(path)) {
                    ClassPathResource classPathResource = asClasspathResource(resource);
                    if (classPathResource != null && classPathResource.exists()) {
                        logger.debug("Registering hints for {}", classPathResource);
                        applyToResource(classPathResource, runtimeHints);
                    }
                }
            } catch (IOException e) {
                throw new UncheckedIOException("Failed to find resources for " + path, e);
            }

        }
    }

    protected void applyToResource(ClassPathResource resource, RuntimeHints hints) {
        hints.resources().registerResource(resource);
    }

    protected ClassPathResource asClasspathResource(Resource resource) {
        if (resource instanceof ClassPathResource) {
            return (ClassPathResource) resource;
        }
        try {
            logger.debug("Transforming {} to a classpath resource", resource);
            String marker = "jar!";
            String externalFormOfUrl = resource.getURL().toExternalForm();
            if (externalFormOfUrl.contains(marker)) {

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Verify the configured resource location exists on the classpath (e.g. src/main/resources/processes/)
  2. Check that build packaging (native-image classpath, bootJar) includes the BPMN/CMMN resource folders
  3. Correct the configured path value in flowable.* properties

Example fix

// before (application.yml)
flowable:
  process-definition-location: classpath*:procesess/
// after
flowable:
  process-definition-location: classpath*:processes/
Defensive patterns

Strategy: validation

Validate before calling

Resource dir = new ClassPathResource("processes/");
if (!dir.exists()) {
    throw new IllegalStateException("Configured auto-deploy resource location 'processes/' not on classpath");
}

Try / catch

try {
    contribution.applyTo(path, runtimeHints);
} catch (UncheckedIOException e) {
    logger.error("Auto-deploy resource location unreadable: {}", path, e);
}

Prevention

When it happens

Trigger: Spring AOT (GraalVM native image) processing invokes applyTo(path, runtimeHints) and resource resolution of the configured path fails — path mismatch, resource is not a directory on the classpath, or filesystem IO error.

Common situations: GraalVM native-image builds where flowable.process-definition-location / cmmn resource location points to a non-existent or mispackaged folder; fat-jar packaging stripping the resources; wrong configured path value.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


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