{"record":{"id":"6909d92d6f6aab23","repo":"flowable/flowable-engine","slug":"failed-to-find-resources-for-path","errorCode":null,"errorMessage":"Failed to find resources for ${path}","messagePattern":"Failed to find resources for (.+?)","errorType":"exception","errorClass":"UncheckedIOException","httpStatus":null,"severity":"error","filePath":"modules/flowable-spring-boot/flowable-spring-boot-starters/flowable-spring-boot-autoconfigure/src/main/java/org/flowable/spring/boot/aot/BaseAutoDeployResourceContribution.java","lineNumber":61,"sourceCode":"        this.locationPrefix = locationPrefix;\n        this.locationSuffixes = locationSuffixes;\n    }\n\n    @Override\n    public void applyTo(GenerationContext generationContext, BeanFactoryInitializationCode beanFactoryInitializationCode) {\n        RuntimeHints runtimeHints = generationContext.getRuntimeHints();\n        for (String locationSuffix : locationSuffixes) {\n            String path = locationPrefix + locationSuffix;\n            try {\n                for (Resource resource : resolver.getResources(path)) {\n                    ClassPathResource classPathResource = asClasspathResource(resource);\n                    if (classPathResource != null && classPathResource.exists()) {\n                        logger.debug(\"Registering hints for {}\", classPathResource);\n                        applyToResource(classPathResource, runtimeHints);\n                    }\n                }\n            } catch (IOException e) {\n                throw new UncheckedIOException(\"Failed to find resources for \" + path, e);\n            }\n\n        }\n    }\n\n    protected void applyToResource(ClassPathResource resource, RuntimeHints hints) {\n        hints.resources().registerResource(resource);\n    }\n\n    protected ClassPathResource asClasspathResource(Resource resource) {\n        if (resource instanceof ClassPathResource) {\n            return (ClassPathResource) resource;\n        }\n        try {\n            logger.debug(\"Transforming {} to a classpath resource\", resource);\n            String marker = \"jar!\";\n            String externalFormOfUrl = resource.getURL().toExternalForm();\n            if (externalFormOfUrl.contains(marker)) {","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-spring-boot/flowable-spring-boot-starters/flowable-spring-boot-autoconfigure/src/main/java/org/flowable/spring/boot/aot/BaseAutoDeployResourceContribution.java#L43-L79","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Verify the configured resource location exists on the classpath (e.g. src/main/resources/processes/)","Check that build packaging (native-image classpath, bootJar) includes the BPMN/CMMN resource folders","Correct the configured path value in flowable.* properties"],"exampleFix":"// before (application.yml)\nflowable:\n  process-definition-location: classpath*:procesess/\n// after\nflowable:\n  process-definition-location: classpath*:processes/","handlingStrategy":"validation","validationCode":"Resource dir = new ClassPathResource(\"processes/\");\nif (!dir.exists()) {\n    throw new IllegalStateException(\"Configured auto-deploy resource location 'processes/' not on classpath\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    contribution.applyTo(path, runtimeHints);\n} catch (UncheckedIOException e) {\n    logger.error(\"Auto-deploy resource location unreadable: {}\", path, e);\n}","preventionTips":["Verify configured resource locations exist in src/main/resources before native builds","Ensure bootJar/native-image packaging includes BPMN/CMMN folders","Run AOT processing locally before CI native builds"],"tags":["aot","native-image","resources","io","flowable"],"backgroundTag":"file-not-found","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}