{"record":{"id":"c000215caf1bc173","repo":"flowable/flowable-engine","slug":"failed-to-read-resource-resource","errorCode":null,"errorMessage":"Failed to read resource <resource>","messagePattern":"Failed to read resource <resource>","errorType":"exception","errorClass":"UncheckedIOException","httpStatus":null,"severity":"critical","filePath":"modules/flowable-app-engine-spring/src/main/java/org/flowable/app/spring/autodeployment/AbstractAppAutoDeploymentStrategy.java","lineNumber":64,"sourceCode":"        return engine.getAppEngineConfiguration().getLockManager(determineLockName(\"appDeploymentsLock\"));\n    }\n\n    protected void addResource(Resource resource, AppDeploymentBuilder deploymentBuilder) {\n        String resourceName = determineResourceName(resource);\n        addResource(resource, resourceName, deploymentBuilder);\n    }\n\n    protected void addResource(Resource resource, String resourceName, AppDeploymentBuilder deploymentBuilder) {\n        try (InputStream inputStream = resource.getInputStream()) {\n            if (resourceName.endsWith(\".bar\") || resourceName.endsWith(\".zip\")) {\n                try (ZipInputStream zipStream = new ZipInputStream(inputStream)) {\n                    deploymentBuilder.addZipInputStream(zipStream);\n                }\n            } else {\n                deploymentBuilder.addInputStream(resourceName, inputStream);\n            }\n        } catch (IOException ex) {\n            throw new UncheckedIOException(\"Failed to read resource \" + resource, ex);\n        }\n    }\n}\n","sourceCodeStart":46,"sourceCodeEnd":68,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine-spring/src/main/java/org/flowable/app/spring/autodeployment/AbstractAppAutoDeploymentStrategy.java#L46-L68","documentation":"AbstractAppAutoDeploymentStrategy.addResource reads an auto-deploy resource (file/zip) from disk to feed the deployment builder. If the underlying stream cannot be read, the IOException is wrapped in an UncheckedIOException with this message. It signals a resource that exists on the classpath but cannot actually be read at deployment time.","triggerScenarios":"Auto-deployment of app resources at startup when resource.getURL()/getInputStream() throws IOException — e.g. the resource file was deleted between discovery and read, is a broken jar reference, or is unreadable due to permissions.","commonSituations":"Deploying inside a fat-jar/container where the resource URL points into a jar that changed; permissions problems on config directories; IDE/devtools hot reload removing the file mid-startup.","solutions":["Verify every auto-deploy resource file exists and is readable by the process user.","Check the cause (ex.getCause()) to see whether it's FileNotFoundException, permission, or a jar/zip problem.","Rebuild/republish the application so resources are consistent with the classpath.","Move the app resources (flowable .app/.zip files) back into src/main/resources and rebuild."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"Resource res = resourceLoader.getResource(path);\nif (!res.exists() || !res.isReadable()) { throw new IllegalStateException(\"Unreadable app resource: \" + path); }","typeGuard":null,"tryCatchPattern":"try { deployAppResource(res); } catch (UncheckedIOException e) {\n    log.error(\"App resource unreadable: \" + e.getMessage() + \", cause=\" + e.getCause(), e);\n}","preventionTips":["Keep flowable app resources in src/main/resources and rebuild before deploy","Check file permissions for the runtime user","Watch for devtools/hot-reload deleting resources during startup","Inspect e.getCause() for FileNotFoundException vs permission issues"],"tags":["io","resource-read","deployment","classpath"],"backgroundTag":"file-read-failed","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"}