flowable/flowable-engine · error · FlowableIllegalArgumentException

deploymentName is null

Error message

deploymentName is null

What it means

DeploymentQueryImpl.deploymentName(String) throws FlowableIllegalArgumentException when the deploymentName argument is null. The value is stored as the query's name filter, and Flowable validates it eagerly so a null filter never produces a SQL query with a null equality predicate.

Solutions

  1. Pass a concrete deployment name string, or use deploymentNameLike with a wildcard if partial matching is needed.
  2. Guard the call: only invoke deploymentName when the name is non-null.
  3. Verify the configuration/property source actually provides the name.

Example fix

// before
query.deploymentName(deploymentName);
// after
if (deploymentName != null) {
    query.deploymentName(deploymentName);
}
Defensive patterns

Strategy: validation

Validate before calling

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

Type guard

boolean hasDeploymentName(String name) { return name != null && !name.isEmpty(); }

Try / catch

try {
    query.deploymentName(deploymentName);
} catch (FlowableIllegalArgumentException e) {
    log.warn("Null deployment name filter ignored", e);
}

Prevention

When it happens

Trigger: repositoryService.createDeploymentQuery().deploymentName(null), commonly when the name comes from user input or a properties/config value that is missing.

Common situations: Admin UIs with optional name filters wired straight into the builder; Spring properties like deployment.name not set, injecting null.

Related errors


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

Appendix: source

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

            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");
        }
        this.nameLike = nameLike;
        return this;
    }

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

View on GitHub (pinned to d6d39ce1c6)