flowable/flowable-engine · error · FlowableIllegalArgumentException

nameLikeIgnoreCase is null

Error message

nameLikeIgnoreCase is null

What it means

FlowableIllegalArgumentException thrown by CaseDefinitionQueryImpl.caseDefinitionNameLikeIgnoreCase(String) when the ignore-case nameLike pattern is null. Like setters share the same eager null validation as exact-match setters; null is not a valid pattern. An unfiltered query (no setter call) already matches all definitions.

Source

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

            throw new FlowableIllegalArgumentException("name is null");
        }
        this.name = name;
        return this;
    }

    @Override
    public CaseDefinitionQueryImpl caseDefinitionNameLike(String nameLike) {
        if (nameLike == null) {
            throw new FlowableIllegalArgumentException("nameLike is null");
        }
        this.nameLike = nameLike;
        return this;
    }

    @Override
    public CaseDefinitionQueryImpl caseDefinitionNameLikeIgnoreCase(String nameLikeIgnoreCase) {
        if (nameLikeIgnoreCase == null) {
            throw new FlowableIllegalArgumentException("nameLikeIgnoreCase is null");
        }
        this.nameLikeIgnoreCase = nameLikeIgnoreCase;
        return this;
    }

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

    @Override
    public CaseDefinitionQueryImpl deploymentIds(Set<String> deploymentIds) {
        if (deploymentIds == null) {
            throw new FlowableIllegalArgumentException("ids are null");

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Pass a non-null pattern, e.g. caseDefinitionNameLikeIgnoreCase("%mycase%").
  2. Guard the call: only set the filter when the pattern is non-null.
  3. Fix the upstream source returning null for the search pattern.

Example fix

// before
query.caseDefinitionNameLikeIgnoreCase(namePattern); // may be null

// after
if (namePattern != null) {
    query.caseDefinitionNameLikeIgnoreCase(namePattern);
}
Defensive patterns

Strategy: validation

Validate before calling

if (nameLikeIgnoreCase != null) {
    query.caseDefinitionNameLikeIgnoreCase(nameLikeIgnoreCase);
}

Type guard

boolean hasPattern = nameLikeIgnoreCase != null && !nameLikeIgnoreCase.isEmpty();

Try / catch

try {
    query.caseDefinitionNameLikeIgnoreCase(pattern);
} catch (FlowableIllegalArgumentException e) {
    // pattern was null — use unfiltered query
}

Prevention

When it happens

Trigger: Calling caseDefinitionNameLikeIgnoreCase(null) on a CaseDefinitionQuery, usually from an optional search-string variable that is null.

Common situations: Case-insensitive search features where the pattern comes from user input or an external service response that was null.

Related errors


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