flowable/flowable-engine · error · FlowableIllegalArgumentException
Deployment ids is null
Error message
Deployment ids is null
What it means
AppDeploymentQueryImpl.deploymentIds() throws FlowableIllegalArgumentException when the List<String> argument is null. The in-list filter needs a real list; null is rejected at call time instead of producing broken SQL.
Source
Thrown at modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDeploymentQueryImpl.java:69
}
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");
}
this.name = deploymentName;
return this;
}
@Override
public AppDeploymentQueryImpl deploymentNameLike(String nameLike) {
if (nameLike == null) {
throw new FlowableIllegalArgumentException("deploymentNameLike is null");View on GitHub (pinned to d6d39ce1c6)
Solutions
- Initialize the list (Collections.emptyList()) so it is never null.
- Guard with if (ids != null) before calling deploymentIds.
- If empty means 'no filter', skip the deploymentIds call when ids.isEmpty().
- Catch FlowableIllegalArgumentException and convert to a validation error response.
Example fix
// before query.deploymentIds(ids); // ids may be null // after List<String> ids = (idsOrNull == null) ? java.util.Collections.emptyList() : idsOrNull; if (!ids.isEmpty()) query.deploymentIds(ids);
Defensive patterns
Strategy: validation
Validate before calling
List<String> safeIds = deploymentIds == null ? java.util.Collections.emptyList() : deploymentIds;
Type guard
boolean isNonEmptyList(List<String> l) { return l != null && !l.isEmpty(); } Try / catch
try {
query.deploymentIds(ids);
} catch (org.flowable.common.engine.api.FlowableIllegalArgumentException e) {
throw new javax.ws.rs.BadRequestException("deploymentIds must not be null", e);
} Prevention
- Initialize lists to empty rather than null
- Return empty collections from service methods, never null
- Skip optional filters when the collection is empty
When it happens
Trigger: Calling deploymentIds(null) with a list variable never initialized, or a service method returning null instead of an empty list.
Common situations: Deserialization of an optional query parameter that yields null, or collecting deployment ids from a loop that never ran and leaving the list null.
Related errors
- Deployment id 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/c85995411dd0f8e0.
Report an issue: GitHub.