{"record":{"id":"e9631e078346bae7","repo":"flowable/flowable-engine","slug":"no-org-flowable-app-engine-appengine-defined-in-th","errorCode":null,"errorMessage":"no org.flowable.app.engine.AppEngine defined in the application context <resource>","messagePattern":"no org\\.flowable\\.app\\.engine\\.AppEngine defined in the application context <resource>","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-app-engine-spring/src/main/java/org/flowable/app/spring/SpringAppConfigurationHelper.java","lineNumber":39,"sourceCode":"import org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport org.springframework.context.support.GenericXmlApplicationContext;\nimport org.springframework.core.io.UrlResource;\n\n/**\n * @author Tijs Rademakers\n */\npublic class SpringAppConfigurationHelper {\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(SpringAppConfigurationHelper.class);\n\n    public static AppEngine buildAppEngine(URL resource) {\n        LOGGER.debug(\"==== BUILDING SPRING APPLICATION CONTEXT AND APP ENGINE =========================================\");\n\n        try (GenericXmlApplicationContext applicationContext = new GenericXmlApplicationContext(new UrlResource(resource))) {\n            Map<String, AppEngine> beansOfType = applicationContext.getBeansOfType(AppEngine.class);\n            if ((beansOfType == null) || beansOfType.isEmpty()) {\n                throw new FlowableException(\"no \" + AppEngine.class.getName() + \" defined in the application context \" + resource);\n            }\n\n            AppEngine appEngine = beansOfType.values().iterator().next();\n\n            LOGGER.debug(\"==== SPRING APP ENGINE CREATED ==================================================================\");\n            return appEngine;\n        }\n    }\n\n}\n","sourceCodeStart":21,"sourceCodeEnd":50,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine-spring/src/main/java/org/flowable/app/spring/SpringAppConfigurationHelper.java#L21-L50","documentation":"FlowableException thrown by SpringAppConfigurationHelper.buildAppEngine when the Spring XML application context loaded from the given URL contains no bean of type org.flowable.app.engine.AppEngine. The helper expects the context file to define an app engine bean (typically via SpringAppEngineConfiguration factory bean).","triggerScenarios":"Calling AppEngineConfiguration build from a spring XML resource (e.g. flowable.app.cfg.xml style context) whose file defines a different engine type or no engine bean at all.","commonSituations":"Copying a process-engine Spring config and forgetting to change the bean class to SpringAppEngineConfiguration, wrong resource URL loaded, bean defined with an unexpected type or not exported.","solutions":["Define a bean of type SpringAppEngineConfiguration (factory bean producing AppEngine) in the XML context","Verify the URL points to the intended Spring context file","Check the bean's class attribute matches org.flowable.app.spring.SpringAppEngineConfiguration"],"exampleFix":"// before\n<bean id=\"processEngineConfiguration\" class=\"org.flowable.engine.impl.cfg.StandaloneProcessEngineConfiguration\"/>\n// after\n<bean id=\"appEngineConfiguration\" class=\"org.flowable.app.spring.SpringAppEngineConfiguration\">\n  <property name=\"dataSource\" ref=\"dataSource\"/>\n  <property name=\"transactionManager\" ref=\"transactionManager\"/>\n</bean>","handlingStrategy":"validation","validationCode":"GenericXmlApplicationContext ctx = new GenericXmlApplicationContext(new UrlResource(resource));\nif (ctx.getBeansOfType(AppEngine.class).isEmpty()) {\n    throw new IllegalStateException(resource + \" defines no AppEngine bean\");\n}","typeGuard":null,"tryCatchPattern":"try { AppEngine e = SpringAppConfigurationHelper.buildAppEngine(url); } catch (FlowableException ex) { log.error(\"Bad spring context: {}\", ex.getMessage()); }","preventionTips":["Keep an AppEngine-typed bean (SpringAppEngineConfiguration) in every engine Spring XML","Sanity-check context files after copying from other engine configs","Log the resolved resource URL before building"],"tags":["spring","flowable","configuration"],"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-14T05:17:10.506Z"}