{"record":{"id":"942e1c988afe9de6","repo":"flowable/flowable-engine","slug":"no-resource-found-with-name-resourcename-in-de","errorCode":null,"errorMessage":"no resource found with name '<resourceName>' in deployment '<deploymentId>'","messagePattern":"no resource found with name '<resourceName>' in deployment '<deploymentId>'","errorType":"exception","errorClass":"FlowableObjectNotFoundException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/GetDeploymentResourceCmd.java","lineNumber":54,"sourceCode":"        this.deploymentId = deploymentId;\n        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        DmnResourceEntity resource = CommandContextUtil.getResourceEntityManager().findResourceByDeploymentIdAndResourceName(deploymentId, resourceName);\n        if (resource == null) {\n            if (CommandContextUtil.getDeploymentEntityManager(commandContext).findById(deploymentId) == null) {\n                throw new FlowableObjectNotFoundException(\"deployment does not exist: \" + deploymentId);\n            } else {\n                throw new FlowableObjectNotFoundException(\"no resource found with name '\" + resourceName + \"' in deployment '\" + deploymentId + \"'\");\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-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/GetDeploymentResourceCmd.java#L36-L61","documentation":"If the deployment exists but no resource row matches the given name, GetDeploymentResourceCmd throws FlowableObjectNotFoundException \"no resource found with name '<name>' in deployment '<id>'\". This is the both-parameters-valid-but-name-mismatch case, distinct from the missing-deployment case.","triggerScenarios":"getDeploymentResource(deploymentId, \"wrong.dmn\") where the deployment exists but contains a differently named resource — the resource was renamed between versions, the name's letter case differs, or the deployment contains a different .dmn file set.","commonSituations":"Renaming a DMN XML file without updating the code that fetches it by name; OS/build pipeline differing in file naming (case-sensitive Linux vs Windows); fetching by name when multiple deployments contain same-named files with different ids.","solutions":["Call dmnRepositoryService.getDeploymentResourceNames(deploymentId) and use an exact returned name","Fix the case/extension to match the deployed resource exactly (lookup is exact-match)","Prefer querying the resource entity (createResourceQuery? / resource query by deployment) rather than guessing the name, or key off DmnDeploymentEntity resource metadata"],"exampleFix":"// before\nrepoService.getDeploymentResource(deploymentId, \"OrderApproval.dmn\"); // actual: order-approval.dmn\n// after\nList<String> names = repoService.getDeploymentResourceNames(deploymentId);\nString name = names.stream().filter(n -> n.endsWith(\".dmn\")).findFirst().orElseThrow();\nrepoService.getDeploymentResource(deploymentId, name);","handlingStrategy":"try-catch","validationCode":"List<String> names = repoService.getDeploymentResourceNames(deploymentId);\nif (!names.contains(resourceName)) throw new NotFoundException(resourceName + \" not in deployment \" + deploymentId + \"; available: \" + names);","typeGuard":null,"tryCatchPattern":"try { return repoService.getDeploymentResource(depId, name); } catch (FlowableObjectNotFoundException e) { if (e.getMessage().startsWith(\"no resource found with name\")) { log.warn(\"resource {} missing in deployment {}\", name, depId); return ResponseEntity.notFound().build(); } throw e; }","preventionTips":["List resource names dynamically instead of assuming file names","Match name case and extension exactly; Linux is case-sensitive","Update lookup constants whenever a DMN file is renamed, ideally within the same commit/release"],"tags":["flowable","dmn","resource","not-found"],"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-14T11:17:12.474Z"}