flowable/flowable-engine · error · FlowableIllegalArgumentException

Deployment id is null

Error message

Deployment id is null

What it means

EventDeploymentQueryImpl.deploymentId sets an exact deployment-id filter on the deployment query. It throws FlowableIllegalArgumentException when deploymentId is null because a null id cannot match any deployment.

Solutions

  1. Pass the deployment id returned by EventRepositoryService.deploy().getId()
  2. Verify the variable/config holding the id is populated before querying
  3. If no id is known, run the query without the deploymentId filter

Example fix

// before
managementService.createEventDeploymentQuery().deploymentId(deploymentId).singleResult();
// after
Objects.requireNonNull(deploymentId, "deploymentId must come from deploy().getId()");
managementService.createEventDeploymentQuery().deploymentId(deploymentId).singleResult();
Defensive patterns

Strategy: validation

Validate before calling

if (deploymentId == null || deploymentId.isEmpty()) { throw new IllegalArgumentException("deploymentId must come from EventRepositoryService.deploy().getId()"); }

Type guard

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

Try / catch

try { q.deploymentId(id).singleResult(); } catch (FlowableIllegalArgumentException e) { log.error("deploymentId is null: {}", e.getMessage()); }

Prevention

When it happens

Trigger: Calling deploymentId(null), typically when the deployment id variable was never populated (deploy() result ignored or a null map lookup).

Common situations: Storing the deployment id from EventRepositoryService.deploy() and reading an unset field, config/property file lacking the deployment id, bean property never set in Spring wiring.

Related errors


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

Appendix: source

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

    protected String eventDefinitionKeyLike;
    protected String channelDefinitionKey;
    protected String channelDefinitionKeyLike;

    public EventDeploymentQueryImpl() {
    }

    public EventDeploymentQueryImpl(CommandContext commandContext) {
        super(commandContext);
    }

    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");

View on GitHub (pinned to d6d39ce1c6)