flowable/flowable-engine · error · FlowableIllegalArgumentException

deploymentName is null

Error message

deploymentName is null

What it means

EventDeploymentQueryImpl.deploymentName sets an exact name filter on the deployment query. It throws FlowableIllegalArgumentException when deploymentName is null because null is not a valid exact-match filter value.

Solutions

  1. Pass the exact deployment name used at deploy time (EventDeploymentBuilder.name(...))
  2. Skip the name filter when unknown to list all deployments
  3. Default the name variable before constructing the query

Example fix

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

Strategy: validation

Validate before calling

if (deploymentName == null || deploymentName.isEmpty()) { throw new IllegalArgumentException("deploymentName required for deploymentName()"); }

Type guard

boolean hasText(String s) { return s != null && !s.trim().isEmpty(); }

Try / catch

try { q.deploymentName(name).list(); } catch (FlowableIllegalArgumentException e) { log.warn("name null, listing all deployments"); }

Prevention

When it happens

Trigger: Calling deploymentName(null), usually when the deployment name comes from a descriptor/config value that is absent.

Common situations: Deployment name configured via properties/env not set, programmatic deployment that never set a name, refactoring removing a default name constant.

Related errors


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

Appendix: source

Thrown at modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventDeploymentQueryImpl.java:72

    }

    public EventDeploymentQueryImpl(CommandExecutor commandExecutor) {
        super(commandExecutor);
    }

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

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

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

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

View on GitHub (pinned to d6d39ce1c6)