{"record":{"id":"eb649157f7756bd4","repo":"flowable/flowable-engine","slug":"couldn-t-auto-deploy-resource-eb6491","errorCode":null,"errorMessage":"couldn't auto deploy resource '': ","messagePattern":"couldn't auto deploy resource '': ","errorType":"exception","errorClass":"ActivitiException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-spring/src/main/java/org/activiti/spring/autodeployment/SingleResourceAutoDeploymentStrategy.java","lineNumber":59,"sourceCode":"    @Override\n    public void deployResources(final String deploymentNameHint, final Resource[] resources, final RepositoryService repositoryService) {\n\n        // Create a separate deployment for each resource using the resource\n        // name\n\n        for (final Resource resource : resources) {\n\n            final String resourceName = determineResourceName(resource);\n            final DeploymentBuilder deploymentBuilder = repositoryService.createDeployment().enableDuplicateFiltering().name(resourceName);\n\n            try {\n                if (resourceName.endsWith(\".bar\") || resourceName.endsWith(\".zip\") || resourceName.endsWith(\".jar\")) {\n                    deploymentBuilder.addZipInputStream(new ZipInputStream(resource.getInputStream()));\n                } else {\n                    deploymentBuilder.addInputStream(resourceName, resource.getInputStream());\n                }\n            } catch (IOException e) {\n                throw new ActivitiException(\"couldn't auto deploy resource '\" + resource + \"': \" + e.getMessage(), e);\n            }\n\n            deploymentBuilder.deploy();\n        }\n    }\n\n}\n","sourceCodeStart":41,"sourceCodeEnd":67,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-spring/src/main/java/org/activiti/spring/autodeployment/SingleResourceAutoDeploymentStrategy.java#L41-L67","documentation":"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.","triggerScenarios":"deployResources called during Spring context startup for one resource whose getInputStream() throws IOException — deleted file, permission issue, unreadable jar entry, or broken resource handle.","commonSituations":"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.","solutions":["Check that the configured resource path exists and is readable from the application's working directory/classpath.","Fix file permissions or restore the deleted resource.","Validate the artifact (jar/war) containing the resource and rebuild it.","If the resource is optional, remove it from deploymentResources or switch to a strategy that tolerates absence."],"exampleFix":"// before\n<property name=\"deploymentResources\" value=\"classpath:/processes/order.bpmn20.xml\" /> <!-- file missing -->\n// after\n<property name=\"deploymentResources\" value=\"classpath:/processes/order-process.bpmn20.xml\" /> <!-- correct path -->","handlingStrategy":"validation","validationCode":"Resource r = new ClassPathResource(\"processes/order-process.bpmn20.xml\");\nif (!r.exists() || !r.isReadable()) throw new IllegalStateException(\"Deployment resource missing/unreadable: \" + r);","typeGuard":null,"tryCatchPattern":"try { startEngine(); } catch (ActivitiException e) { log.error(\"Single-resource auto deploy failed: {}\", e.getMessage(), e); }","preventionTips":["Pin exact resource paths and assert their presence in tests.","Check file permissions in deployment containers.","Rebuild artifacts after changing packaged resources."],"tags":["spring","auto-deployment","io","resource-loading"],"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"}