flowable/flowable-engine · error · FlowableIllegalArgumentException

deploymentNameLike is null

Error message

deploymentNameLike is null

What it means

DeploymentQueryImpl.deploymentNameLike(String) throws FlowableIllegalArgumentException when the nameLike argument is null. This filter performs a SQL LIKE match on deployment names (e.g. "%MyDeployment%"), and Flowable rejects null at the builder call instead of emitting a broken LIKE clause.

Solutions

  1. Pass a non-null LIKE pattern, including % wildcards as needed.
  2. Guard: if (nameLike != null) query.deploymentNameLike(nameLike).
  3. Default to an empty/omitted filter when the search term is absent.

Example fix

// before
query.deploymentNameLike(searchTerm); // throws when null
// after
if (searchTerm != null) {
    query.deploymentNameLike("%" + searchTerm + "%");
}
Defensive patterns

Strategy: validation

Validate before calling

if (searchTerm != null) {
    query.deploymentNameLike("%" + searchTerm + "%");
}

Type guard

boolean hasSearchTerm(String term) { return term != null && !term.isEmpty(); }

Try / catch

try {
    query.deploymentNameLike(nameLike);
} catch (FlowableIllegalArgumentException e) {
    log.warn("Null nameLike filter ignored", e);
}

Prevention

When it happens

Trigger: repositoryService.createDeploymentQuery().deploymentNameLike(null); typically a search box or filter variable that was never set.

Common situations: Search UIs passing the raw (null) search term; refactors renaming variables so an unset field is handed to the builder.

Related errors


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

Appendix: source

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

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

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

View on GitHub (pinned to d6d39ce1c6)