flowable/flowable-engine · error · FlowableIllegalArgumentException
Deployment id is null
Error message
Deployment id is null
What it means
AppDeploymentQueryImpl.deploymentId() throws FlowableIllegalArgumentException when the deploymentId argument is null. Query filters require an explicit value; a null filter is ambiguous so the fluent API rejects it eagerly.
Source
Thrown at modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDeploymentQueryImpl.java:60
protected String tenantIdLike;
protected boolean withoutTenantId;
protected boolean latest;
public AppDeploymentQueryImpl() {
}
public AppDeploymentQueryImpl(CommandContext commandContext) {
super(commandContext);
}
public AppDeploymentQueryImpl(CommandExecutor commandExecutor) {
super(commandExecutor);
}
@Override
public AppDeploymentQueryImpl deploymentId(String deploymentId) {
if (deploymentId == null) {
throw new FlowableIllegalArgumentException("Deployment id is null");
}
this.deploymentId = deploymentId;
return this;
}
@Override
public AppDeploymentQueryImpl deploymentIds(List<String> deploymentIds) {
if (deploymentIds == null) {
throw new FlowableIllegalArgumentException("Deployment ids is null");
}
this.deploymentIds = deploymentIds;
return this;
}
@Override
public AppDeploymentQueryImpl deploymentName(String deploymentName) {
if (deploymentName == null) {
throw new FlowableIllegalArgumentException("deploymentName is null");View on GitHub (pinned to d6d39ce1c6)
Solutions
- Check deploymentId != null before building the query.
- Capture the Deployment returned by deploy() to obtain a reliable id.
- Skip the filter call conditionally when the id is absent (e.g. omit deploymentId()).
- Catch FlowableIllegalArgumentException at the API boundary and return a 400-style message.
Example fix
// before
AppDeploymentQuery q = createDeploymentQuery().deploymentId(id); // id may be null
// after
if (id == null) throw new IllegalArgumentException("deploymentId required");
AppDeploymentQuery q = createDeploymentQuery().deploymentId(id); Defensive patterns
Strategy: validation
Validate before calling
if (deploymentId == null) { throw new IllegalArgumentException("deploymentId is required"); } Try / catch
try {
query.deploymentId(deploymentId);
} catch (org.flowable.common.engine.api.FlowableIllegalArgumentException e) {
throw new javax.ws.rs.BadRequestException("deploymentId must not be null", e);
} Prevention
- Always capture the Deployment returned by deploy() for its id
- Validate path/request parameters before querying
- Make id fields @NotNull in your API DTOs
When it happens
Trigger: Calling appRepositoryService.createDeploymentQuery().deploymentId(null), typically with a variable that was not populated from a prior deployment result.
Common situations: Storing createDeployment().deploy() result in a field that stayed null, or passing an unset request parameter straight into the query.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Deployment ids is null
- deploymentName is null
- deploymentNameLike is null
- deploymentCategory is null
- deploymentCategoryExclude is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/085352f9ad54c5ed.
Report an issue: GitHub.