{"record":{"id":"6941314e8f0e0362","repo":"flowable/flowable-engine","slug":"could-not-register-rabbit-listener-endpoint-on-c","errorCode":null,"errorMessage":"Could not register rabbit listener endpoint on [<channelDefinition>], no RabbitAdmin with id '<rabbitAdmin>' was found in the application context","messagePattern":"Could not register rabbit listener endpoint on \\[<channelDefinition>\\], no RabbitAdmin with id '<rabbitAdmin>' was found in the application context","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-event-registry-spring/src/main/java/org/flowable/eventregistry/spring/rabbit/RabbitChannelDefinitionProcessor.java","lineNumber":228,"sourceCode":"            try {\n                return Integer.valueOf(priority);\n            } catch (NumberFormatException ex) {\n                throw new IllegalArgumentException(\"Invalid priority value for \" +\n                    channelDefinition + \" (must be an integer)\", ex);\n            }\n        } else {\n            return null;\n        }\n    }\n\n    protected RabbitAdmin resolveAdmin(RabbitInboundChannelModel channelDefinition) {\n        String rabbitAdmin = resolve(channelDefinition.getAdmin());\n        if (StringUtils.hasText(rabbitAdmin)) {\n            Assert.state(this.beanFactory != null, \"BeanFactory must be set to resolve RabbitAdmin by bean name\");\n            try {\n                return this.beanFactory.getBean(rabbitAdmin, RabbitAdmin.class);\n            } catch (NoSuchBeanDefinitionException ex) {\n                throw new IllegalArgumentException(\"Could not register rabbit listener endpoint on [\" +\n                    channelDefinition + \"], no \" + RabbitAdmin.class.getSimpleName() + \" with id '\" +\n                    rabbitAdmin + \"' was found in the application context\", ex);\n            }\n        } else {\n            return null;\n        }\n    }\n\n    protected AcknowledgeMode resolveAckMode(RabbitInboundChannelModel channelDefinition) {\n        String ackModeAttr = channelDefinition.getAckMode();\n        if (StringUtils.hasText(ackModeAttr)) {\n            Object ackMode = resolveExpression(ackModeAttr);\n            if (ackMode instanceof String) {\n                return AcknowledgeMode.valueOf((String) ackMode);\n            } else if (ackMode instanceof AcknowledgeMode) {\n                return (AcknowledgeMode) ackMode;\n            } else {\n                throw new IllegalArgumentException(\"ackMode in definition [ \" + channelDefinition + \" ] must resolve to a String or AcknowledgeMode\");","sourceCodeStart":210,"sourceCodeEnd":246,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-event-registry-spring/src/main/java/org/flowable/eventregistry/spring/rabbit/RabbitChannelDefinitionProcessor.java#L210-L246","documentation":"When the channel definition specifies an admin bean by name, resolveAdmin looks it up in the BeanFactory as a RabbitAdmin. If no bean with that id exists, the IllegalArgumentException is thrown (wrapping NoSuchBeanDefinitionException) and endpoint registration fails.","triggerScenarios":"channelDefinition.getAdmin() resolves to a bean name (e.g. 'rabbitAdmin') that is not registered as a RabbitAdmin in the application context, during createRabbitListenerEndpoint.","commonSituations":"Typo in the admin bean id in the channel definition; RabbitAdmin bean removed or not declared (@Bean missing, wrong profile); definition copied from another project with different bean naming; conditional bean not created.","solutions":["Define a RabbitAdmin bean with the referenced id, e.g. @Bean public RabbitAdmin rabbitAdmin(ConnectionFactory cf){return new RabbitAdmin(cf);}","Fix the admin id in the channel definition to match the actual bean name","Remove the admin attribute if default admin resolution is acceptable","Verify the bean isn't excluded by profiles/conditions"],"exampleFix":"// before\n\"admin\": \"rabbitAdmin\"  // no such bean exists\n// after\n@Bean\npublic RabbitAdmin rabbitAdmin(ConnectionFactory connectionFactory) {\n    return new RabbitAdmin(connectionFactory);\n}","handlingStrategy":"validation","validationCode":"String adminName = channelDefinition.getAdmin();\nif (adminName != null && !adminName.isBlank() && !applicationContext.containsBean(adminName)) {\n    throw new IllegalArgumentException(\"Referenced RabbitAdmin bean not found: \" + adminName);\n}","typeGuard":null,"tryCatchPattern":"try {\n    processor.process(definition);\n} catch (IllegalArgumentException ex) {\n    if (ex.getMessage().contains(\"RabbitAdmin\")) {\n        log.error(\"Missing RabbitAdmin bean: {}\", ex.getMessage());\n    }\n    throw ex;\n}","preventionTips":["Keep admin bean names in one constant/enum shared by definitions and @Bean methods","Declare a default RabbitAdmin bean in shared configuration","Use ApplicationContext.containsBean checks in startup validation"],"tags":["rabbitmq","spring","beans","configuration"],"backgroundTag":"resource-not-found","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}