flowable/flowable-engine · error · FlowableObjectNotFoundException
Could not find a deployment with id '<deploymentId>'.
Error message
Could not find a deployment with id '<deploymentId>'.
What it means
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.
Source
Thrown at modules/flowable-app-engine-rest/src/main/java/org/flowable/app/rest/service/api/repository/AppDeploymentResourceResource.java:80
* @ApiImplicitParam(name = "resourceId", dataType = "string", value =
* "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."
* , paramType = "path") })
*/
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Indicates both deployment and resource have been found and the resource has been returned."),
@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.")
})
@GetMapping(value = "/app-repository/deployments/{deploymentId}/resources/**", produces = "application/json")
public AppDeploymentResourceResponse getDeploymentResource(@ApiParam(name = "deploymentId") @PathVariable("deploymentId") String deploymentId, HttpServletRequest request) {
// The ** is needed because the name of the resource can actually contain forward slashes.
// For example org/flowable/oneApp.app. The number of forward slashes is unknown.
// Using ** means that everything should get matched.
// See also https://stackoverflow.com/questions/31421061/how-to-handle-requests-that-includes-forward-slashes/42403361#42403361
// Check if deployment exists
AppDeployment deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
if (deployment == null) {
throw new FlowableObjectNotFoundException("Could not find a deployment with id '" + deploymentId + "'.");
}
if (restApiInterceptor != null) {
restApiInterceptor.accessDeploymentById(deployment);
}
String pathInfo = request.getPathInfo();
String resourceName = pathInfo.replace("/app-repository/deployments/" + deploymentId + "/resources/", "");
List<String> resourceList = repositoryService.getDeploymentResourceNames(deploymentId);
if (resourceList.contains(resourceName)) {
// Build resource representation
return restResponseFactory.createDeploymentResourceResponse(deploymentId, resourceName, contentTypeResolver.resolveContentType(resourceName));
} else {
// Resource not found in deployment
throw new FlowableObjectNotFoundException("Could not find a resource with id '" + resourceName + "' in deployment '" + deploymentId + "'.");
}View on GitHub (pinned to d6d39ce1c6)
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
Example fix
// before GET /app-repository/app-deployments/deploy-x/resources // after curl /app-repository/app-deployments | jq '.data[0].id' GET /app-repository/app-deployments/<thatId>/resources
Defensive patterns
Strategy: validation
Validate before calling
AppDeployment d = appRepositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
if (d == null) { throw new EntityNotFoundException("Deployment " + deploymentId + " does not exist"); } Try / catch
try { ... } catch (FlowableObjectNotFoundException e) { return ResponseEntity.status(404).body("Deployment not found: " + deploymentId); } Prevention
- 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
When it happens
Trigger: GET /app-repository/app-deployments/{deploymentId}/resources (list) or .../{resourceName} where deploymentId is unknown, deleted, or from another engine's table.
Common situations: Hard-coded ids from another environment, mixing process-engine and app-engine deployments, deployment purged by cleanup jobs.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Could not find a resource with id '<resourceName>' in deploy
- Could not find an app deployment with id '<deploymentId>
- Could not find an app deployment with id '<deploymentId>
- Could not find a resource with name '<resourceName>' in depl
- Could not find a resource with id '<resourceName>' in deploy
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/79f90b234cd42bd1.
Report an issue: GitHub.