{"record":{"id":"ee2fa169f7f17ba1","repo":"flowable/flowable-engine","slug":"deployment-deploymentid-didn-t-put-channel-de","errorCode":null,"errorMessage":"deployment '${deploymentId}' didn't put channel definition '${channelDefinitionId}' in the cache","messagePattern":"deployment '(.+?)' didn't put channel definition '(.+?)' in the cache","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/persistence/deploy/EventDeploymentManager.java","lineNumber":218,"sourceCode":"    public ChannelDefinitionCacheEntry resolveChannelDefinition(ChannelDefinition channelDefinition) {\n        String channelDefinitionId = channelDefinition.getId();\n        String deploymentId = channelDefinition.getDeploymentId();\n\n        ChannelDefinitionCacheEntry cachedChannelDefinition = channelDefinitionCache.get(channelDefinitionId);\n\n        if (cachedChannelDefinition == null) {\n            EventDeploymentEntity deployment = engineConfig.getDeploymentEntityManager().findById(deploymentId);\n            List<EventResourceEntity> resources = engineConfig.getResourceEntityManager().findResourcesByDeploymentId(deploymentId);\n            for (EventResourceEntity resource : resources) {\n                deployment.addResource(resource);\n            }\n\n            deployment.setNew(false);\n            deploy(deployment);\n            cachedChannelDefinition = channelDefinitionCache.get(channelDefinitionId);\n\n            if (cachedChannelDefinition == null) {\n                throw new FlowableException(\"deployment '\" + deploymentId + \"' didn't put channel definition '\" + channelDefinitionId + \"' in the cache\");\n            }\n        }\n        return cachedChannelDefinition;\n    }\n\n    public void removeDeployment(String deploymentId) {\n        EventDeploymentEntity deployment = deploymentEntityManager.findById(deploymentId);\n        if (deployment == null) {\n            throw new FlowableObjectNotFoundException(\"Could not find a deployment with id '\" + deploymentId + \"'.\");\n        }\n\n        // Remove any event and channel definition from the cache\n        List<EventDefinition> eventDefinitions = new EventDefinitionQueryImpl().deploymentId(deploymentId).list();\n        List<ChannelDefinition> channelDefinitions = new ChannelDefinitionQueryImpl().deploymentId(deploymentId).list();\n\n        // Delete data\n        deploymentEntityManager.deleteDeployment(deploymentId);\n","sourceCodeStart":200,"sourceCodeEnd":236,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/persistence/deploy/EventDeploymentManager.java#L200-L236","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Verify the deployment still contains the channel model resource for this definition id.","Redeploy the channel definition cleanly and confirm it appears via ChannelDefinitionQuery.deploymentId(...).","Inspect the event registry deployer pipeline to ensure channel models are parsed and cached.","Remove orphaned channel definition rows or the whole broken deployment and redeploy."],"exampleFix":"// before\nChannelDefinitionEntity ch = eventDeploymentManager.findDeployedChannelDefinitionById(channelId);\n// after\nChannelDefinition ch = eventRepositoryService.createChannelDefinitionQuery().deploymentId(deploymentId).list()\n    .stream().filter(c -> c.getId().equals(channelId)).findFirst()\n    .orElseThrow(() -> new IllegalStateException(\"channel missing, redeploy deployment \" + deploymentId));","handlingStrategy":"fallback","validationCode":"ChannelDefinition ch = eventRepositoryService.createChannelDefinitionQuery().deploymentId(deploymentId).list()\n    .stream().filter(c -> c.getId().equals(channelDefinitionId)).findFirst().orElse(null);\nif (ch == null) throw new IllegalStateException(\"channel \" + channelDefinitionId + \" missing from deployment \" + deploymentId);","typeGuard":null,"tryCatchPattern":"try {\n    entry = manager.findDeployedChannelDefinitionById(channelDefinitionId);\n} catch (FlowableException e) {\n    throw new IllegalStateException(\"channel deployment data inconsistent, redeploy \" + deploymentId, e);\n}","preventionTips":["Keep channel model resources intact in the deployment store; don't purge resources independently.","Test custom channel model processors against the default deployer pipeline.","Redeploy whole deployments, never patch single definition rows.","Validate cache configuration changes against channel definition resolution."],"tags":["flowable","event-registry","cache","channel"],"backgroundTag":"internal-invariant-violation","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}