{"record":{"id":"f2a961da2a3a31a7","repo":"flowable/flowable-engine","slug":"could-not-find-a-resource-with-id-resourcename-f2a961","errorCode":null,"errorMessage":"Could not find a resource with id '<resourceName>' in deployment '<deploymentId>'.","messagePattern":"Could not find a resource with id '<resourceName>' in deployment '<deploymentId>'\\.","errorType":"http","errorClass":"FlowableObjectNotFoundException","httpStatus":404,"severity":"error","filePath":"modules/flowable-app-engine-rest/src/main/java/org/flowable/app/rest/service/api/repository/AppDeploymentResourceResource.java","lineNumber":97,"sourceCode":"        if (deployment == null) {\n            throw new FlowableObjectNotFoundException(\"Could not find a deployment with id '\" + deploymentId + \"'.\");\n        }\n        \n        if (restApiInterceptor != null) {\n            restApiInterceptor.accessDeploymentById(deployment);\n        }\n\n        String pathInfo = request.getPathInfo();\n        String resourceName = pathInfo.replace(\"/app-repository/deployments/\" + deploymentId + \"/resources/\", \"\");\n\n        List<String> resourceList = repositoryService.getDeploymentResourceNames(deploymentId);\n\n        if (resourceList.contains(resourceName)) {\n            // Build resource representation\n            return restResponseFactory.createDeploymentResourceResponse(deploymentId, resourceName, contentTypeResolver.resolveContentType(resourceName));\n        } else {\n            // Resource not found in deployment\n            throw new FlowableObjectNotFoundException(\"Could not find a resource with id '\" + resourceName + \"' in deployment '\" + deploymentId + \"'.\");\n        }\n    }\n}\n","sourceCodeStart":79,"sourceCodeEnd":101,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine-rest/src/main/java/org/flowable/app/rest/service/api/repository/AppDeploymentResourceResource.java#L79-L101","documentation":"Thrown by the app-engine REST layer when a GET on /app-repository/deployments/{deploymentId}/resources/{resourceName} requests a resource whose name (extracted from the request path) is not present in the deployment's resource list. The deployment itself exists, but it contains no artifact with that name, so no stream can be served.","triggerScenarios":"GET /app-repository/app-deployments/{deploymentId}/resources/{resourceName} with a name not in that deployment's resource set.","commonSituations":"Requesting a process definition resource from an app deployment, wrong casing, names altered by URL decoding (e.g. %20 vs space).","solutions":["List resources first via GET .../app-deployments/{deploymentId}/resources","Use the exact resource name returned there","Verify the resource belongs to this deployment, not another one"],"exampleFix":"// before\nGET /app-repository/app-deployments/123/resources/processes/my-process.bpmn20.xml\n// after\nGET /app-repository/app-deployments/123/resources  # returns app.cmmn.json etc.\nGET /app-repository/app-deployments/123/resources/app.cmmn.json","handlingStrategy":"validation","validationCode":"List<String> resources = repositoryService.getDeploymentResourceNames(deploymentId);\nif (!resources.contains(resourceName)) { throw new IllegalArgumentException(\"Unknown resource \" + resourceName); }","typeGuard":null,"tryCatchPattern":"try { ... } catch (FlowableObjectNotFoundException e) { return ResponseEntity.status(404).body(\"Resource not in deployment\"); }","preventionTips":["List deployment resources first and copy exact names","Match case exactly","Do not assume process resources exist in app deployments"],"tags":["rest","flowable","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-14T05:17:10.506Z"}