{"record":{"id":"d99b881b295c61ec","repo":"flowable/flowable-engine","slug":"no-deployed-channel-definition-found-with-id-ch","errorCode":null,"errorMessage":"no deployed channel definition found with id '${channelDefinitionId}'","messagePattern":"no deployed channel definition found with id '(.+?)'","errorType":"exception","errorClass":"FlowableObjectNotFoundException","httpStatus":404,"severity":"error","filePath":"modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/persistence/deploy/EventDeploymentManager.java","lineNumber":100,"sourceCode":"            }\n            eventDefinition = resolveEventDefinition(eventDefinition).getEventDefinitionEntity();\n        }\n        return eventDefinition;\n    }\n    \n    public ChannelDefinitionEntity findDeployedChannelDefinitionById(String channelDefinitionId) {\n        if (channelDefinitionId == null) {\n            throw new FlowableException(\"Invalid channel definition id : null\");\n        }\n\n        // first try the cache\n        ChannelDefinitionCacheEntry cacheEntry = channelDefinitionCache.get(channelDefinitionId);\n        ChannelDefinitionEntity channelDefinition = cacheEntry != null ? cacheEntry.getChannelDefinitionEntity() : null;\n\n        if (channelDefinition == null) {\n            channelDefinition = engineConfig.getChannelDefinitionEntityManager().findById(channelDefinitionId);\n            if (channelDefinition == null) {\n                throw new FlowableObjectNotFoundException(\"no deployed channel definition found with id '\" + channelDefinitionId + \"'\");\n            }\n            channelDefinition = resolveChannelDefinition(channelDefinition).getChannelDefinitionEntity();\n        }\n        return channelDefinition;\n    }\n\n    public EventDefinitionEntity findDeployedLatestEventDefinitionByKey(String eventDefinitionKey) {\n        EventDefinitionEntity eventDefinition = eventDefinitionEntityManager.findLatestEventDefinitionByKey(eventDefinitionKey);\n\n        if (eventDefinition == null) {\n            throw new FlowableObjectNotFoundException(\"no event definitions deployed with key '\" + eventDefinitionKey + \"'\");\n        }\n        eventDefinition = resolveEventDefinition(eventDefinition).getEventDefinitionEntity();\n        return eventDefinition;\n    }\n    \n    public ChannelDefinitionEntity findDeployedLatestChannelDefinitionByKey(String channelDefinitionKey) {\n        ChannelDefinitionEntity channelDefinition = channelDefinitionEntityManager.findLatestChannelDefinitionByKey(channelDefinitionKey);","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/persistence/deploy/EventDeploymentManager.java#L82-L118","documentation":"findDeployedChannelDefinitionById throws FlowableObjectNotFoundException when neither the definition cache nor the database (via ChannelDefinitionEntityManager.findById) contains a channel definition with the given id.","triggerScenarios":"Looking up a channel definition id that was never deployed, was deleted by a prior undeployment, or exists only in another database/engine configuration.","commonSituations":"Stale channel ids after redeploying under a new id; cross-environment id reuse; lookups racing ahead of the deployment transaction commit; typos in configured channel ids.","solutions":["Verify the id exists in the event-registry channel definition table","Redeploy the channel definition if missing","Point the engine configuration at the correct database","Catch FlowableObjectNotFoundException and handle the absent-channel case gracefully"],"exampleFix":"// before\nChannelDefinitionEntity ch = deploymentManager.findDeployedChannelDefinitionById(channelId);\n// after\ntry {\n    ch = deploymentManager.findDeployedChannelDefinitionById(channelId);\n} catch (FlowableObjectNotFoundException e) {\n    ch = deploymentManager.findDeployedLatestChannelDefinitionByKey(channelKey);\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    ch = deploymentManager.findDeployedChannelDefinitionById(id);\n} catch (org.flowable.common.engine.api.FlowableObjectNotFoundException e) {\n    ch = deploymentManager.findDeployedLatestChannelDefinitionByKey(channelKey);\n}","preventionTips":["Prefer key-based lookups when ids may change between deploys","Ensure deployment and lookup hit the same database/engine config","Catch FlowableObjectNotFoundException around all id-based definition resolutions"],"tags":["java","event-registry","not-found"],"backgroundTag":"record-not-found","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}