flowable/flowable-engine · error · FlowableIllegalArgumentException

deploymentNameLike is null

Error message

deploymentNameLike is null

What it means

FlowableIllegalArgumentException thrown by CmmnDeploymentQueryImpl.deploymentNameLike when the nameLike argument is null. The LIKE-style name filter requires a non-null pattern string (optionally containing SQL wildcards like %); null is rejected as invalid.

Solutions

  1. Omit the deploymentNameLike() call when no pattern is provided so the filter is skipped
  2. Construct the pattern including wildcards (e.g. "%" + input + "%") only when input is non-null
  3. Validate/sanitize the search input before building the query

Example fix

// before
query.deploymentNameLike("%" + userInput + "%"); // NPE if userInput null
// after
if (userInput != null && !userInput.isEmpty()) { query.deploymentNameLike("%" + userInput + "%"); }
Defensive patterns

Strategy: validation

Validate before calling

if (pattern != null && !pattern.isEmpty()) { query.deploymentNameLike("%" + pattern + "%"); }

Type guard

static boolean hasNamePattern(String p) { return p != null && !p.trim().isEmpty(); }

Try / catch

try {
    query.deploymentNameLike(pattern);
} catch (FlowableIllegalArgumentException e) {
    if ("deploymentNameLike is null".equals(e.getMessage())) {
        throw new IllegalArgumentException("nameLike pattern must not be null; omit the filter instead", e);
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling createDeploymentQuery().deploymentNameLike(null), commonly when building a dynamic search where the user did not supply a name pattern and the null was passed straight through.

Common situations: Search forms with optional 'name contains' fields, API query params absent so mapped to null, dynamic query assembly from maps/config with missing keys.

Related errors


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

Appendix: source

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

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

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

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

View on GitHub (pinned to d6d39ce1c6)