{"record":{"id":"5937ef6ec88bdd5f","repo":"flowable/flowable-engine","slug":"could-not-find-an-app-deployment-with-id-deploym-5937ef","errorCode":null,"errorMessage":"Could not find an app deployment with id '<deploymentId>","messagePattern":"Could not find an app deployment with id '<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/AppDeploymentResourceDataResource.java","lineNumber":74,"sourceCode":"            @ApiResponse(code = 200, message = \"Indicates both app deployment and resource have been found and the resource data has been returned.\"),\n            @ApiResponse(code = 404, message = \"Indicates the requested app deployment was not found or there is no resource with the given id present in the app deployment. The status-description contains additional information.\") })\n    @GetMapping(value = \"/app-repository/deployments/{deploymentId}/resourcedata/{resourceName}\")\n    @ResponseBody\n    public byte[] getAppDeploymentResource(@ApiParam(name = \"deploymentId\") @PathVariable(\"deploymentId\") String deploymentId,\n            @ApiParam(name = \"resourceName\") @PathVariable(\"resourceName\") String resourceName,\n            HttpServletResponse response) {\n        \n        if (deploymentId == null) {\n            throw new FlowableIllegalArgumentException(\"No deployment id provided\");\n        }\n        if (resourceName == null) {\n            throw new FlowableIllegalArgumentException(\"No resource name provided\");\n        }\n\n        // Check if deployment exists\n        AppDeployment deployment = appRepositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();\n        if (deployment == null) {\n            throw new FlowableObjectNotFoundException(\"Could not find an app deployment with id '\" + deploymentId);\n        }\n        \n        if (restApiInterceptor != null) {\n            restApiInterceptor.accessDeploymentById(deployment);\n        }\n\n        List<String> resourceList = appRepositoryService.getDeploymentResourceNames(deploymentId);\n\n        if (resourceList.contains(resourceName)) {\n            response.setContentType(\"application/json\");\n            try (final InputStream resourceStream = appRepositoryService.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 {","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine-rest/src/main/java/org/flowable/app/rest/service/api/repository/AppDeploymentResourceDataResource.java#L56-L92","documentation":"FlowableObjectNotFoundException thrown when no AppDeployment exists for the given deploymentId in the app repository. The query returns null and the REST layer converts that into a 404-style error. The id simply does not match any app deployment in the database.","triggerScenarios":"GET /app-repository/app-deployments/{deploymentId}/resources/{resourceName} where deploymentId is wrong, was deleted, or belongs to a different Flowable engine/database schema.","commonSituations":"Typo or stale id after redeployment, pointing at the process-engine deployments table instead of the app-engine table, using an id from another environment.","solutions":["List valid ids via GET /app-repository/app-deployments and use one that exists","Check the app engine is configured against the database you expect","Re-deploy the app if the deployment was removed"],"exampleFix":"// before\ncurl http://host/flowable-rest/app-repository/app-deployments/999/resources/app.json\n// after\ncurl http://host/flowable-rest/app-repository/app-deployments  # find real id first\ncurl http://host/flowable-rest/app-repository/app-deployments/<realId>/resources/app.json","handlingStrategy":"validation","validationCode":"AppDeployment d = appRepositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();\nif (d == null) { throw new EntityNotFoundException(\"App deployment \" + deploymentId + \" does not exist\"); }","typeGuard":null,"tryCatchPattern":"try { ... } catch (FlowableObjectNotFoundException e) { return ResponseEntity.status(404).body(\"Unknown deployment id\"); }","preventionTips":["Resolve ids dynamically from a deployment list query instead of hard-coding","Check the app engine's database configuration matches your data source","Handle 404s explicitly when ids come from user input"],"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"}