{"record":{"id":"39244b2dc29b6aac","repo":"flowable/flowable-engine","slug":"could-not-find-a-resource-with-id-resourcename-39244b","errorCode":null,"errorMessage":"Could not find a resource with id '${resourceName}' in deployment '${deploymentId}'.","messagePattern":"Could not find a resource with id '(.+?)' in deployment '(.+?)'\\.","errorType":"http","errorClass":"FlowableObjectNotFoundException","httpStatus":404,"severity":"error","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/repository/DeploymentResourceResource.java","lineNumber":98,"sourceCode":"        }\n        \n        if (restApiInterceptor != null) {\n            restApiInterceptor.accessDeploymentById(deployment);\n        }\n\n        String pathInfo = request.getPathInfo();\n        String resourceName = pathInfo.replace(\"/repository/deployments/\" + deploymentId + \"/resources/\", \"\");\n\n        List<String> resourceList = repositoryService.getDeploymentResourceNames(deploymentId);\n\n        if (resourceList.contains(resourceName)) {\n            // Build resource representation\n            DeploymentResourceResponse response = restResponseFactory.createDeploymentResourceResponse(deploymentId, resourceName, contentTypeResolver.resolveContentType(resourceName));\n            return response;\n\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":80,"sourceCodeEnd":102,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/repository/DeploymentResourceResource.java#L80-L102","documentation":"FlowableObjectNotFoundException thrown by getDeploymentResource when the deployment exists but contains no resource named resourceName. The deployment's resource list is searched and if the name does not match any entry exactly, this error is raised. Results in HTTP 404.","triggerScenarios":"GET /repository/deployments/{deploymentId}/resources/{resourceName} where the resource name differs in case, path prefix, or spelling from any resource in that deployment.","commonSituations":"Resource names inside bar/zip archives carry internal paths (e.g. 'order/process.bpmn20.xml'); using only the file name, wrong case (Linux DBs are case-sensitive), or querying a resource that belongs to a different deployment.","solutions":["List exact resource names via GET /repository/deployments/{deploymentId}/resources and copy the 'id' field verbatim","Include the full path prefix stored in the archive when the resource came from a .bar/.zip","Match case exactly — resource lookup is case-sensitive","Confirm the resource was part of this specific deployment, not an earlier one"],"exampleFix":"// before\nGET /repository/deployments/1/resources/process.bpmn20.xml  // actual id: mypkg/process.bpmn20.xml\n// after\nGET /repository/deployments/1/resources  -> find exact id\nGET /repository/deployments/1/resources/mypkg%2Fprocess.bpmn20.xml","handlingStrategy":"validation","validationCode":"const res = await rest.get(`/repository/deployments/${deploymentId}/resources`);\nconst found = res.data.find(r => r.id === resourceName);\nif (!found) throw new Error(`Resource ${resourceName} not in deployment; available: ${res.data.map(r => r.id).join(', ')}`);","typeGuard":null,"tryCatchPattern":"try {\n    await rest.get(`/repository/deployments/${deploymentId}/resources/${encodeURIComponent(resourceName)}`);\n} catch (e) {\n    if (e.response?.status === 404) {\n        // list resources to discover exact ids (case, path prefix) and retry\n    }\n}","preventionTips":["Always take resource ids verbatim from the resources list endpoint","Include archive-internal path prefixes for .bar/.zip resources","Remember lookups are case-sensitive; match exactly"],"tags":["deployment","resource","not-found","rest"],"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"}