flowable/flowable-engine · error · FlowableIllegalArgumentException

resourceName is null

Error message

resourceName is null

What it means

ChannelDefinitionQueryImpl.channelDefinitionResourceName() validates its argument and throws FlowableIllegalArgumentException when the resourceName is null. This is an eager fail-fast guard: a null resource name would produce a broken SQL LIKE/equals filter later, so the query API rejects it at the point of use instead. The error indicates the caller passed null where a non-null deployment resource name string is required.

Solutions

  1. Pass a non-null resource name, e.g. repositoryService.createChannelDefinitionQuery().channelDefinitionResourceName("my.channel")
  2. Check the value for null before building the query and skip calling channelDefinitionResourceName if absent
  3. Use channelDefinitionResourceNameLike with a safe pattern if you need partial matching, guarding null the same way

Example fix

// before
ChannelDefinitionQuery q = repositoryService.createChannelDefinitionQuery().channelDefinitionResourceName(resourceName);
// after
ChannelDefinitionQuery q = repositoryService.createChannelDefinitionQuery();
if (resourceName != null) { q = q.channelDefinitionResourceName(resourceName); }
Defensive patterns

Strategy: validation

Validate before calling

Objects.requireNonNull(resourceName, "resourceName must not be null");

Type guard

null

Try / catch

null

Prevention

When it happens

Trigger: Calling channelDefinitionResourceName(null) on a ChannelDefinitionQuery, typically when the resource name value comes from an unpopulated variable, config property, or request parameter.

Common situations: Building repository queries dynamically where the resource name is optional upstream but passed through unconditionally; properties/env lookups returning null; deserialized DTOs with a missing field.

Related errors


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

Appendix: source

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

        return this;
    }
    
    @Override
    public ChannelDefinitionQueryImpl channelCreateTimeAfter(Date createTimeAfter) {
        this.createTimeAfter = createTimeAfter;
        return this;
    }
    
    @Override
    public ChannelDefinitionQueryImpl channelCreateTimeBefore(Date createTimeBefore) {
        this.createTimeBefore = createTimeBefore;
        return this;
    }

    @Override
    public ChannelDefinitionQueryImpl channelDefinitionResourceName(String resourceName) {
        if (resourceName == null) {
            throw new FlowableIllegalArgumentException("resourceName is null");
        }
        this.resourceName = resourceName;
        return this;
    }

    @Override
    public ChannelDefinitionQueryImpl channelDefinitionResourceNameLike(String resourceNameLike) {
        if (resourceNameLike == null) {
            throw new FlowableIllegalArgumentException("resourceNameLike is null");
        }
        this.resourceNameLike = resourceNameLike;
        return this;
    }

    @Override
    public ChannelDefinitionQueryImpl tenantId(String tenantId) {
        if (tenantId == null) {
            throw new FlowableIllegalArgumentException("form tenantId is null");

View on GitHub (pinned to d6d39ce1c6)