{"record":{"id":"79f90b234cd42bd1","repo":"flowable/flowable-engine","slug":"could-not-find-a-deployment-with-id-deploymentid-79f90b","errorCode":null,"errorMessage":"Could not find a deployment with id '<deploymentId>'.","messagePattern":"Could not find a 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/AppDeploymentResourceResource.java","lineNumber":80,"sourceCode":"     * @ApiImplicitParam(name = \"resourceId\", dataType = \"string\", value =\n     * \"The id of the resource to get. Make sure you URL-encode the resourceId in case it contains forward slashes. Eg: use folder%2FoneApp.app instead of folder/oneApp.app.\"\n     * , paramType = \"path\") })\n     */\n    @ApiResponses(value = {\n            @ApiResponse(code = 200, message = \"Indicates both deployment and resource have been found and the resource has been returned.\"),\n            @ApiResponse(code = 404, message = \"Indicates the requested deployment was not found or there is no resource with the given id present in the deployment. The status-description contains additional information.\")\n    })\n    @GetMapping(value = \"/app-repository/deployments/{deploymentId}/resources/**\", produces = \"application/json\")\n    public AppDeploymentResourceResponse getDeploymentResource(@ApiParam(name = \"deploymentId\") @PathVariable(\"deploymentId\") String deploymentId, HttpServletRequest request) {\n        // The ** is needed because the name of the resource can actually contain forward slashes.\n        // For example org/flowable/oneApp.app. The number of forward slashes is unknown.\n        // Using ** means that everything should get matched.\n        // See also https://stackoverflow.com/questions/31421061/how-to-handle-requests-that-includes-forward-slashes/42403361#42403361\n\n        // Check if deployment exists\n        AppDeployment deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();\n        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        }","sourceCodeStart":62,"sourceCodeEnd":98,"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#L62-L98","documentation":"FlowableObjectNotFoundException thrown by getDeploymentResource when no deployment with the given id exists. It is a plain 404-style signal that the deploymentId path variable matches nothing in the repository.","triggerScenarios":"GET /app-repository/app-deployments/{deploymentId}/resources (list) or .../{resourceName} where deploymentId is unknown, deleted, or from another engine's table.","commonSituations":"Hard-coded ids from another environment, mixing process-engine and app-engine deployments, deployment purged by cleanup jobs.","solutions":["Query GET /app-repository/app-deployments to obtain a valid deployment id","Confirm you are querying the app-engine REST endpoints, not the generic process repository API","Re-deploy the application if the deployment is gone"],"exampleFix":"// before\nGET /app-repository/app-deployments/deploy-x/resources\n// after\ncurl /app-repository/app-deployments | jq '.data[0].id'\nGET /app-repository/app-deployments/<thatId>/resources","handlingStrategy":"validation","validationCode":"AppDeployment d = appRepositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();\nif (d == null) { throw new EntityNotFoundException(\"Deployment \" + deploymentId + \" does not exist\"); }","typeGuard":null,"tryCatchPattern":"try { ... } catch (FlowableObjectNotFoundException e) { return ResponseEntity.status(404).body(\"Deployment not found: \" + deploymentId); }","preventionTips":["Discover deployment ids via the REST list endpoint instead of storing literals","Distinguish app-engine deployments from process-engine deployments","Verify environment (dev/test/prod) when reusing ids"],"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"}