{"record":{"id":"e4fe335549d7c049","repo":"flowable/flowable-engine","slug":"no-org-flowable-eventregistry-api-eventregistryeng","errorCode":null,"errorMessage":"no org.flowable.eventregistry.api.EventRegistryEngine defined in the application context <resource>","messagePattern":"no org\\.flowable\\.eventregistry\\.api\\.EventRegistryEngine defined in the application context <resource>","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-event-registry-spring/src/main/java/org/flowable/eventregistry/spring/SpringEventConfigurationHelper.java","lineNumber":36,"sourceCode":"\nimport org.flowable.common.engine.api.FlowableException;\nimport org.flowable.eventregistry.impl.EventRegistryEngine;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport org.springframework.context.support.GenericXmlApplicationContext;\nimport org.springframework.core.io.UrlResource;\n\npublic class SpringEventConfigurationHelper {\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(SpringEventConfigurationHelper.class);\n\n    public static EventRegistryEngine buildEventRegistryEngine(URL resource) {\n        LOGGER.debug(\"==== BUILDING SPRING APPLICATION CONTEXT AND EVENT REGISTRY =========================================\");\n\n        try (GenericXmlApplicationContext applicationContext = new GenericXmlApplicationContext(new UrlResource(resource))) {\n            Map<String, EventRegistryEngine> beansOfType = applicationContext.getBeansOfType(EventRegistryEngine.class);\n            if ((beansOfType == null) || beansOfType.isEmpty()) {\n                throw new FlowableException(\"no \" + EventRegistryEngine.class.getName() + \" defined in the application context \" + resource);\n            }\n\n            EventRegistryEngine eventRegistryEngine = beansOfType.values().iterator().next();\n\n            LOGGER.debug(\"==== SPRING EVENT REGISTRY CREATED ==================================================================\");\n            return eventRegistryEngine;\n        }\n    }\n\n}\n","sourceCodeStart":18,"sourceCodeEnd":47,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-event-registry-spring/src/main/java/org/flowable/eventregistry/spring/SpringEventConfigurationHelper.java#L18-L47","documentation":"SpringEventConfigurationHelper.buildEventRegistryEngine boots a Spring XML application context from a URL and looks up a bean of type org.flowable.eventregistry.api.EventRegistryEngine. If the context loads but contains no such bean, it throws this FlowableException. It means the XML resource exists but does not define an EventRegistryEngine bean (typically a SpringEventRegistryEngineConfiguration bean producing one).","triggerScenarios":"Calling FlowableEventRegistryEngineConfiguration (SpringEventConfigurationHelper).buildEventRegistryEngine(URL) with an XML resource whose context has no EventRegistryEngine bean, or a bean of a different/wrong type, or the engine bean is defined but not of the expected interface.","commonSituations":"Pointing the resource URL at the wrong XML file; the XML defines a process-engine configuration instead of an event-registry one; missing the <flowable:event-registry-engine> style bean definition; bean type mismatch after a Flowable version upgrade.","solutions":["Inspect the XML resource and add an EventRegistryEngine bean definition (e.g. a SpringEventRegistryEngineConfiguration bean).","Verify the resource URL/classpath location actually points to the intended event-registry Spring context file.","Check the bean's class implements org.flowable.eventregistry.api.EventRegistryEngine (not just an engine configuration).","After upgrades, confirm bean naming/type conventions still match the Flowable version in use."],"exampleFix":"<!-- before: context has no event registry engine bean -->\n<bean id=\"processEngineConfiguration\" class=\"org.flowable.spring.SpringProcessEngineConfiguration\"/>\n\n<!-- after -->\n<bean id=\"eventRegistryEngineConfiguration\" class=\"org.flowable.eventregistry.spring.SpringEventRegistryEngineConfiguration\">\n  <property name=\"dataSource\" ref=\"dataSource\"/>\n  <property name=\"transactionManager\" ref=\"transactionManager\"/>\n</bean>\n<bean id=\"eventRegistryEngine\" factory-bean=\"eventRegistryEngineConfiguration\" factory-method=\"buildEventRegistryEngine\"/>","handlingStrategy":"validation","validationCode":"// Validate the XML context defines an EventRegistryEngine before building\nGenericXmlApplicationContext ctx = new GenericXmlApplicationContext(new UrlResource(resource));\nif (ctx.getBeansOfType(EventRegistryEngine.class).isEmpty()) {\n    throw new IllegalStateException(\"Resource lacks EventRegistryEngine bean: \" + resource);\n}\nctx.close();","typeGuard":"boolean isEventRegistryEngineBean(Object bean) { return bean instanceof org.flowable.eventregistry.api.EventRegistryEngine; }","tryCatchPattern":null,"preventionTips":["Keep a dedicated, reviewed Spring XML for the event registry engine.","Assert engine bean presence in an integration test that boots the resource.","Verify resource URLs resolve to the intended files at startup."],"tags":["spring","configuration","event-registry","missing-bean"],"backgroundTag":"missing-required-config","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"}