{"record":{"id":"a185d7f7d3380c6f","repo":"flowable/flowable-engine","slug":"could-not-find-a-resource-with-name-resourcename-a185d7","errorCode":null,"errorMessage":"Could not find a resource with name '<resourceName>' in deployment '<deploymentId>","messagePattern":"Could not find a resource with name '<resourceName>' in deployment '<deploymentId>","errorType":"http","errorClass":"FlowableObjectNotFoundException","httpStatus":404,"severity":"error","filePath":"modules/flowable-dmn-rest/src/main/java/org/flowable/dmn/rest/service/api/repository/BaseDmnDeploymentResourceDataResource.java","lineNumber":80,"sourceCode":"        if (restApiInterceptor != null) {\n            restApiInterceptor.accessDeploymentById(deployment);\n        }\n\n        List<String> resourceList = dmnRepositoryService.getDeploymentResourceNames(deploymentId);\n\n        if (resourceList.contains(resourceName)) {\n            String contentType = contentTypeResolver.resolveContentType(resourceName);\n            response.setContentType(contentType);\n            try (final InputStream resourceStream = dmnRepositoryService.getResourceAsStream(deploymentId, resourceName)) {\n                return IOUtils.toByteArray(resourceStream);\n                \n            } catch (Exception e) {\n                throw new FlowableException(\"Error converting resource stream\", e);\n            }\n            \n        } else {\n            // Resource not found in deployment\n            throw new FlowableObjectNotFoundException(\"Could not find a resource with name '\" + resourceName + \"' in deployment '\" + deploymentId);\n        }\n    }\n}\n","sourceCodeStart":62,"sourceCodeEnd":84,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-rest/src/main/java/org/flowable/dmn/rest/service/api/repository/BaseDmnDeploymentResourceDataResource.java#L62-L84","documentation":"If the deployment's resource map contains no entry for the given resourceName, the method throws FlowableObjectNotFoundException(\"Could not find a resource with name '<resourceName>' in deployment '<deploymentId>'\"). The deployment exists, but no resource in it has that exact name.","triggerScenarios":"GET /dmn-repository/deployments/{deploymentId}/resource-data/{resourceName} where resourceName does not match any resource name in the deployment: wrong file name, wrong deployment, case mismatch, or resource ids used in place of names.","commonSituations":"Deployments containing renamed DMN files; expecting auto-generated or path-prefixed names that differ from the original file name; case-sensitive filesystem vs DB name comparison; typos in configured names.","solutions":["List resource names via GET /dmn-repository/deployments/{deploymentId}/resources and copy the exact name.","Match the name case-sensitively, including any path prefix stored with the resource.","Point the request at the correct deployment that actually contains the named resource.","Redeploy the DMN file under the expected name if it was renamed."],"exampleFix":"// before\nbyte[] data = client.getDeploymentResourceDataByName(deploymentId, \"MyDecision.DMN\"); // stored as 'my-decision.dmn'\n// after\nString exactName = client.getDeploymentResources(deploymentId).stream()\n    .map(ResourceResponse::getName)\n    .filter(n -> n.equalsIgnoreCase(\"MyDecision.DMN\"))\n    .findFirst().orElseThrow(() -> new IllegalStateException(\"resource not deployed\"));\nbyte[] data = client.getDeploymentResourceDataByName(deploymentId, exactName);","handlingStrategy":"validation","validationCode":"List<String> names = getDeploymentResources(deploymentId).stream()\n    .map(ResourceResponse::getName).collect(toList());\nif (!names.contains(resourceName)) throw new IllegalStateException(\"available: \" + names);","typeGuard":null,"tryCatchPattern":"try {\n    return client.getDeploymentResourceDataByName(deploymentId, resourceName);\n} catch (FlowableObjectNotFoundException e) {\n    // resolve exact (case-sensitive) name from resources list and retry once\n}","preventionTips":["Copy resource names verbatim from the resources endpoint (exact case, includes path prefixes)","Verify the target deployment actually contains the named file","Keep DMN file names stable across redeploys"],"tags":["rest","not-found","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"}