{"record":{"id":"512f0351762eb6e2","repo":"flowable/flowable-engine","slug":"event-registry-has-not-been-initialized","errorCode":null,"errorMessage":"Event registry has not been initialized","messagePattern":"Event registry has not been initialized","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"modules/flowable-spring-boot/flowable-spring-boot-starters/flowable-spring-boot-autoconfigure/src/main/java/org/flowable/spring/boot/eventregistry/EventRegistryServicesAutoConfiguration.java","lineNumber":72,"sourceCode":"\n    /**\n     * If a process engine is present that means that the EventRegistryEngine was created as part of it.\n     * Therefore extract it from the EventRegistryEngines.\n     */\n    @Configuration(proxyBeanMethods = false)\n    @ConditionalOnMissingBean(type = {\n        \"org.flowable.eventregistry.impl.EventRegistryEngine\",\n        \"org.flowable.app.engine.AppEngine\"\n    })\n    @ConditionalOnBean(type = {\n        \"org.flowable.engine.ProcessEngine\"\n    })\n    static class AlreadyInitializedEventRegistryConfiguration {\n        @Bean\n        public EventRegistryEngine eventRegistryEngine(@SuppressWarnings(\"unused\") ProcessEngine processEngine) {\n            // The process engine needs to be injected, as otherwise it won't be initialized, which means that the EventRegistryEngine is not initialized yet\n            if (!EventRegistryEngines.isInitialized()) {\n                throw new IllegalStateException(\"Event registry has not been initialized\");\n            }\n            return EventRegistryEngines.getDefaultEventRegistryEngine();\n        }\n    }\n    \n    /**\n     * If an app engine is present that means that the EventRegistryEngine was created as part of the app engine.\n     * Therefore extract it from the EventRegistryEngines.\n     */\n    @Configuration(proxyBeanMethods = false)\n    @ConditionalOnMissingBean(type = {\n        \"org.flowable.eventregistry.impl.EventRegistryEngine\"\n    })\n    @ConditionalOnBean(type = {\n        \"org.flowable.app.engine.AppEngine\"\n    })\n    static class AlreadyInitializedAppEngineConfiguration {\n","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-spring-boot/flowable-spring-boot-starters/flowable-spring-boot-autoconfigure/src/main/java/org/flowable/spring/boot/eventregistry/EventRegistryServicesAutoConfiguration.java#L54-L90","documentation":"The EventRegistryServicesAutoConfiguration exposes the already-initialized event registry engine from the static EventRegistryEngines registry as a Spring bean. If no event registry engine has been initialized when the bean method runs, it throws this IllegalStateException. The injected ProcessEngine is expected to have bootstrapped the event registry engine.","triggerScenarios":"Auto-configuration selects AlreadyInitializedEventRegistryConfiguration and eventRegistryEngine(ProcessEngine) runs while EventRegistryEngines.isInitialized() is false — no engine bootstrap initialized an EventRegistryEngine beforehand.","commonSituations":"Event registry starter present but process engine excluded or failing; manual engine configuration bypassing auto-configuration; missing event-registry dependency in a multi-engine setup.","solutions":["Ensure the ProcessEngine auto-configuration runs and includes the event registry configurator","Add/verify flowable-event-registry-spring-configurator in the engine configuration","Let auto-configuration build a standalone EventRegistryEngineConfiguration bean instead of using the already-initialized bean","Check for earlier engine-init failures in logs that left EventRegistryEngines uninitialized"],"exampleFix":"// before: process engine built without event registry\nProcessEngineConfiguration.createProcessEngineConfigurationFromResourceDefault();\n// after: register the configurator\nconfig.addConfigurator(new EventRegistryEngineConfigurator());","handlingStrategy":"validation","validationCode":"if (!EventRegistryEngines.isInitialized()) { throw new IllegalStateException(\"Initialize the event registry engine before requesting the bean\"); }","typeGuard":"boolean eventRegistryAvailable = EventRegistryEngines.isInitialized();","tryCatchPattern":"try { return EventRegistryEngines.getDefaultEventRegistryEngine(); } catch (IllegalStateException e) { /* build EventRegistryEngineConfiguration locally */ }","preventionTips":["Register EventRegistryEngineConfigurator in the engine config","Keep event-registry dependencies aligned with the engine version","Do not disable process-engine auto-configuration while using event-registry beans","Check startup logs for bootstrap failures"],"tags":["spring-boot","event-registry","engine-initialization"],"backgroundTag":"module-init-failed","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"}