flowable/flowable-engine · error · FlowableIllegalArgumentException

Deployment ids is null

Error message

Deployment ids is null

What it means

DeploymentQueryImpl.deploymentIds(List<String>) throws FlowableIllegalArgumentException when the list itself is null. Flowable rejects a null collection at builder time; note that an empty list is accepted here, so only a true null triggers the error. The list supplies an IN-clause of deployment ids.

Solutions

  1. Pass a non-null List, e.g. Collections.emptyList() if there are no ids.
  2. Normalize inputs: query.deploymentIds(ids == null ? Collections.emptyList() : ids).
  3. Skip the filter call entirely when no ids are provided.

Example fix

// before
query.deploymentIds(deploymentIds); // NPE-ish when list is null
// after
if (deploymentIds != null && !deploymentIds.isEmpty()) {
    query.deploymentIds(deploymentIds);
}
Defensive patterns

Strategy: validation

Validate before calling

List<String> ids = (rawIds == null) ? Collections.emptyList() : rawIds;
if (!ids.isEmpty()) {
    query.deploymentIds(ids);
}

Type guard

boolean isNonNullIdList(List<String> ids) { return ids != null; }

Try / catch

try {
    query.deploymentIds(deploymentIds);
} catch (FlowableIllegalArgumentException e) {
    log.warn("Null deployment id list", e);
}

Prevention

When it happens

Trigger: repositoryService.createDeploymentQuery().deploymentIds(null), typically when the id list is built dynamically and a null slips through (uninitialized collection, null return from a lookup).

Common situations: Bulk filters fed by another service call that returned null instead of an empty list; deserialized request bodies where the ids array was absent.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/5f902bbf35a41418. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/DeploymentQueryImpl.java:78

    }

    public DeploymentQueryImpl(CommandExecutor commandExecutor) {
        super(commandExecutor);
    }

    @Override
    public DeploymentQueryImpl deploymentId(String deploymentId) {
        if (deploymentId == null) {
            throw new FlowableIllegalArgumentException("Deployment id is null");
        }
        this.deploymentId = deploymentId;
        return this;
    }

    @Override
    public DeploymentQueryImpl deploymentIds(List<String> deploymentIds) {
        if (deploymentIds == null) {
            throw new FlowableIllegalArgumentException("Deployment ids is null");
        }
        this.deploymentIds = deploymentIds;
        return this;
    }

    @Override
    public DeploymentQueryImpl deploymentName(String deploymentName) {
        if (deploymentName == null) {
            throw new FlowableIllegalArgumentException("deploymentName is null");
        }
        this.name = deploymentName;
        return this;
    }

    @Override
    public DeploymentQueryImpl deploymentNameLike(String nameLike) {
        if (nameLike == null) {
            throw new FlowableIllegalArgumentException("deploymentNameLike is null");

View on GitHub (pinned to d6d39ce1c6)