flowable/flowable-engine · error · FlowableException

deployment '${deploymentId}' didn't put channel definition '

Error message

deployment '${deploymentId}' didn't put channel definition '${channelDefinitionId}' in the cache

What it means

FlowableException raised in resolveChannelDefinition: after lazily re-deploying a deployment, the channelDefinitionCache still contains no entry for channelDefinitionId. It mirrors error 2872 but for channel definitions, meaning the re-deploy did not register the requested channel definition in the cache.

Source

Thrown at modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/persistence/deploy/EventDeploymentManager.java:218

    public ChannelDefinitionCacheEntry resolveChannelDefinition(ChannelDefinition channelDefinition) {
        String channelDefinitionId = channelDefinition.getId();
        String deploymentId = channelDefinition.getDeploymentId();

        ChannelDefinitionCacheEntry cachedChannelDefinition = channelDefinitionCache.get(channelDefinitionId);

        if (cachedChannelDefinition == null) {
            EventDeploymentEntity deployment = engineConfig.getDeploymentEntityManager().findById(deploymentId);
            List<EventResourceEntity> resources = engineConfig.getResourceEntityManager().findResourcesByDeploymentId(deploymentId);
            for (EventResourceEntity resource : resources) {
                deployment.addResource(resource);
            }

            deployment.setNew(false);
            deploy(deployment);
            cachedChannelDefinition = channelDefinitionCache.get(channelDefinitionId);

            if (cachedChannelDefinition == null) {
                throw new FlowableException("deployment '" + deploymentId + "' didn't put channel definition '" + channelDefinitionId + "' in the cache");
            }
        }
        return cachedChannelDefinition;
    }

    public void removeDeployment(String deploymentId) {
        EventDeploymentEntity deployment = deploymentEntityManager.findById(deploymentId);
        if (deployment == null) {
            throw new FlowableObjectNotFoundException("Could not find a deployment with id '" + deploymentId + "'.");
        }

        // Remove any event and channel definition from the cache
        List<EventDefinition> eventDefinitions = new EventDefinitionQueryImpl().deploymentId(deploymentId).list();
        List<ChannelDefinition> channelDefinitions = new ChannelDefinitionQueryImpl().deploymentId(deploymentId).list();

        // Delete data
        deploymentEntityManager.deleteDeployment(deploymentId);

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Verify the deployment still contains the channel model resource for this definition id.
  2. Redeploy the channel definition cleanly and confirm it appears via ChannelDefinitionQuery.deploymentId(...).
  3. Inspect the event registry deployer pipeline to ensure channel models are parsed and cached.
  4. Remove orphaned channel definition rows or the whole broken deployment and redeploy.

Example fix

// before
ChannelDefinitionEntity ch = eventDeploymentManager.findDeployedChannelDefinitionById(channelId);
// after
ChannelDefinition ch = eventRepositoryService.createChannelDefinitionQuery().deploymentId(deploymentId).list()
    .stream().filter(c -> c.getId().equals(channelId)).findFirst()
    .orElseThrow(() -> new IllegalStateException("channel missing, redeploy deployment " + deploymentId));
Defensive patterns

Strategy: fallback

Validate before calling

ChannelDefinition ch = eventRepositoryService.createChannelDefinitionQuery().deploymentId(deploymentId).list()
    .stream().filter(c -> c.getId().equals(channelDefinitionId)).findFirst().orElse(null);
if (ch == null) throw new IllegalStateException("channel " + channelDefinitionId + " missing from deployment " + deploymentId);

Try / catch

try {
    entry = manager.findDeployedChannelDefinitionById(channelDefinitionId);
} catch (FlowableException e) {
    throw new IllegalStateException("channel deployment data inconsistent, redeploy " + deploymentId, e);
}

Prevention

When it happens

Trigger: Calling any findDeployedChannelDefinition* method for an id whose parent deployment is not in the deployment cache, then the redeploy fails to produce a ChannelDefinitionCacheEntry for that id (missing/inaccessible channel resource, deployer skipping it).

Common situations: Database rows for channel definitions whose XML/JSON resources were lost; custom ChannelModelProcessor not registering the model; failed migration leaving orphaned definitions; cache configured to drop entries without redeploy support.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


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