flowable/flowable-engine · error · FlowableObjectNotFoundException
Could not find an app deployment with id '<deploymentId>
Error message
Could not find an app deployment with id '<deploymentId>
What it means
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.
Source
Thrown at modules/flowable-app-engine-rest/src/main/java/org/flowable/app/rest/service/api/repository/AppDeploymentResourceDataResource.java:74
@ApiResponse(code = 200, message = "Indicates both app deployment and resource have been found and the resource data has been returned."),
@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.") })
@GetMapping(value = "/app-repository/deployments/{deploymentId}/resourcedata/{resourceName}")
@ResponseBody
public byte[] getAppDeploymentResource(@ApiParam(name = "deploymentId") @PathVariable("deploymentId") String deploymentId,
@ApiParam(name = "resourceName") @PathVariable("resourceName") String resourceName,
HttpServletResponse response) {
if (deploymentId == null) {
throw new FlowableIllegalArgumentException("No deployment id provided");
}
if (resourceName == null) {
throw new FlowableIllegalArgumentException("No resource name provided");
}
// Check if deployment exists
AppDeployment deployment = appRepositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
if (deployment == null) {
throw new FlowableObjectNotFoundException("Could not find an app deployment with id '" + deploymentId);
}
if (restApiInterceptor != null) {
restApiInterceptor.accessDeploymentById(deployment);
}
List<String> resourceList = appRepositoryService.getDeploymentResourceNames(deploymentId);
if (resourceList.contains(resourceName)) {
response.setContentType("application/json");
try (final InputStream resourceStream = appRepositoryService.getResourceAsStream(deploymentId, resourceName)) {
return IOUtils.toByteArray(resourceStream);
} catch (Exception e) {
throw new FlowableException("Error converting resource stream", e);
}
} else {View on GitHub (pinned to d6d39ce1c6)
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
Example fix
// before curl http://host/flowable-rest/app-repository/app-deployments/999/resources/app.json // after curl http://host/flowable-rest/app-repository/app-deployments # find real id first curl http://host/flowable-rest/app-repository/app-deployments/<realId>/resources/app.json
Defensive patterns
Strategy: validation
Validate before calling
AppDeployment d = appRepositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
if (d == null) { throw new EntityNotFoundException("App deployment " + deploymentId + " does not exist"); } Try / catch
try { ... } catch (FlowableObjectNotFoundException e) { return ResponseEntity.status(404).body("Unknown deployment id"); } Prevention
- 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
When it happens
Trigger: GET /app-repository/app-deployments/{deploymentId}/resources/{resourceName} where deploymentId is wrong, was deleted, or belongs to a different Flowable engine/database schema.
Common situations: 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.
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 a resource with name '<resourceName>' in depl
- Could not find a deployment with id '<deploymentId>'.
- 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/5937ef6ec88bdd5f.
Report an issue: GitHub.