flowable/flowable-engine · error · FlowableIllegalArgumentException

name is null

Error message

name is null

What it means

appDefinitionName(null) throws FlowableIllegalArgumentException because AppDefinitionQueryImpl stores the name for an exact-match SQL equality predicate; null is rejected eagerly at builder time. The message 'name is null' identifies which criterion failed.

Source

Thrown at modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDefinitionQueryImpl.java:113

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

    @Override
    public AppDefinitionQueryImpl appDefinitionCategoryNotEquals(String categoryNotEquals) {
        if (categoryNotEquals == null) {
            throw new FlowableIllegalArgumentException("categoryNotEquals is null");
        }
        this.categoryNotEquals = categoryNotEquals;
        return this;
    }

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

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

    @Override
    public AppDefinitionQueryImpl deploymentId(String deploymentId) {
        if (deploymentId == null) {
            throw new FlowableIllegalArgumentException("id is null");

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Guard with a null check and only apply the name criterion when present
  2. Coerce empty/absent input to a defined default or skip the filter
  3. Catch FlowableIllegalArgumentException in the controller and return 400

Example fix

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

Strategy: validation

Validate before calling

if (name != null) {
    query.appDefinitionName(name);
}

Type guard

boolean isApplicable(String v) { return v != null && !v.isEmpty(); }

Try / catch

try {
    query.appDefinitionName(name);
} catch (FlowableIllegalArgumentException e) {
    throw new ResponseStatusException(HttpStatus.BAD_REQUEST, e.getMessage(), e);
}

Prevention

When it happens

Trigger: Calling appDefinitionName(name) with a null String — usually an unset variable from optional input, an unpopulated DTO field, or a lookup that returned null.

Common situations: Search-form field left empty and bound straight to the query; JSON body missing the 'name' property (Jackson leaves it null); refactor changed a default value to null.

Related errors


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