{"record":{"id":"67e2b51ab09207d0","repo":"flowable/flowable-engine","slug":"no-resource-found-with-name-in-deployment-67e2b5","errorCode":null,"errorMessage":"no resource found with name '' in deployment ''","messagePattern":"no resource found with name '' in deployment ''","errorType":"exception","errorClass":"FlowableObjectNotFoundException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/cmd/GetDeploymentResourceCmd.java","lineNumber":54,"sourceCode":"        this.resourceName = resourceName;\n    }\n\n    @Override\n    public InputStream execute(CommandContext commandContext) {\n        if (deploymentId == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentId is null\");\n        }\n        if (resourceName == null) {\n            throw new FlowableIllegalArgumentException(\"resourceName is null\");\n        }\n\n        CmmnResourceEntity resource = CommandContextUtil.getCmmnResourceEntityManager(commandContext)\n                .findResourceByDeploymentIdAndResourceName(deploymentId, resourceName);\n        if (resource == null) {\n            if (CommandContextUtil.getCmmnDeploymentEntityManager(commandContext).findById(deploymentId) == null) {\n                throw new FlowableObjectNotFoundException(\"deployment does not exist: \" + deploymentId, CmmnDeploymentEntity.class);\n            } else {\n                throw new FlowableObjectNotFoundException(\"no resource found with name '\" + resourceName + \"' in deployment '\" + deploymentId + \"'\", CmmnResourceEntity.class);\n            }\n        }\n        return new ByteArrayInputStream(resource.getBytes());\n    }\n\n}\n","sourceCodeStart":36,"sourceCodeEnd":61,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/cmd/GetDeploymentResourceCmd.java#L36-L61","documentation":"When the resource lookup by deploymentId+resourceName finds nothing but the deployment itself exists, the command throws FlowableObjectNotFoundException stating no resource with that name exists in the deployment. The deployment is valid, only the resource name does not match.","triggerScenarios":"Calling CmmnRepositoryService.getResource(deploymentId, resourceName) where the deployment exists but no resource row matches that exact resource name (typo, wrong extension, resource removed, or name case mismatch).","commonSituations":"Guessing the resource name instead of listing it; deployment packaged without the .cmmn/.png file; using the model key instead of the file name; database migration dropping resource rows.","solutions":["Call cmmnRepositoryService.getDeploymentResourceNames(deploymentId) and use an exact returned name","Check spelling/extension/case of resourceName against what was deployed","Redeploy with the resource included"],"exampleFix":"// before\nInputStream is = cmmnRepositoryService.getResource(deploymentId, \"myCase.cmmn\"); // typo\n// after\nList<String> names = cmmnRepositoryService.getDeploymentResourceNames(deploymentId);\nif (names.contains(\"my-case.cmmn\")) {\n    InputStream is = cmmnRepositoryService.getResource(deploymentId, \"my-case.cmmn\");\n}","handlingStrategy":"fallback","validationCode":"List<String> names = cmmnRepositoryService.getDeploymentResourceNames(deploymentId);\nboolean present = names != null && names.contains(resourceName);","typeGuard":null,"tryCatchPattern":"try { return cmmnRepositoryService.getResource(deploymentId, name); } catch (FlowableObjectNotFoundException e) { return fallbackResource(name); }","preventionTips":["Always list deployment resource names before fetching a resource","Deploy resources with fixed, well-known file names","Remember matching is exact (case and extension sensitive)"],"tags":["not-found","cmmn","resource"],"backgroundTag":"resource-not-found","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}