flowable/flowable-engine · error · FlowableIllegalArgumentException

Deployment ids is null

Error message

Deployment ids is null

What it means

FlowableIllegalArgumentException thrown by CmmnDeploymentQueryImpl.deploymentIds when the deploymentIds list is null. The query needs a non-null list of deployment ids to build an IN filter; null is rejected instead of being treated as an empty or absent filter.

Solutions

  1. Ensure the list is non-null (use Collections.emptyList() if no ids) before calling
  2. Skip the deploymentIds() call when the list is absent, so the filter is simply not applied
  3. Check the upstream producer of the id list for null returns

Example fix

// before
query.deploymentIds(idsFromConfig); // may be null
// after
if (idsFromConfig != null && !idsFromConfig.isEmpty()) { query.deploymentIds(idsFromConfig); }
Defensive patterns

Strategy: validation

Validate before calling

if (ids != null && !ids.isEmpty()) { query.deploymentIds(ids); }

Type guard

static boolean hasDeploymentIds(List<String> ids) { return ids != null && !ids.isEmpty(); }

Try / catch

try {
    query.deploymentIds(ids);
} catch (FlowableIllegalArgumentException e) {
    if ("Deployment ids is null".equals(e.getMessage())) {
        throw new IllegalArgumentException("deploymentIds list must not be null", e);
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling cmmnRepositoryService.createDeploymentQuery().deploymentIds(null), typically when the id list comes from a collection that was never populated or a lookup that returned null.

Common situations: Passing a null collection assembled from external input, forgetting to initialize the list before query construction, optional filtering logic that should have skipped the call.

Related errors


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

Appendix: source

Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CmmnDeploymentQueryImpl.java:72

    }

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

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

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

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

View on GitHub (pinned to d6d39ce1c6)