{"record":{"id":"2aeafcdaafa6b46a","repo":"flowable/flowable-engine","slug":"transactionmanager-is-required-property-for-spring-2aeafc","errorCode":null,"errorMessage":"transactionManager is required property for SpringProcessEngineConfiguration, use  otherwise","messagePattern":"transactionManager is required property for SpringProcessEngineConfiguration, use  otherwise","errorType":"exception","errorClass":"ActivitiException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-spring/src/main/java/org/activiti/spring/SpringProcessEngineConfiguration.java","lineNumber":84,"sourceCode":"        autoDeployResources(processEngine);\n        return processEngine;\n    }\n\n    public void setTransactionSynchronizationAdapterOrder(Integer transactionSynchronizationAdapterOrder) {\n        this.transactionSynchronizationAdapterOrder = transactionSynchronizationAdapterOrder;\n    }\n\n    @Override\n    protected void initDefaultCommandConfig() {\n        if (defaultCommandConfig == null) {\n            defaultCommandConfig = new CommandConfig().setContextReusePossible(true);\n        }\n    }\n\n    @Override\n    protected CommandInterceptor createTransactionInterceptor() {\n        if (transactionManager == null) {\n            throw new ActivitiException(\"transactionManager is required property for SpringProcessEngineConfiguration, use \" + StandaloneProcessEngineConfiguration.class.getName() + \" otherwise\");\n        }\n\n        return new SpringTransactionInterceptor(transactionManager);\n    }\n\n    @Override\n    protected void initTransactionContextFactory() {\n        if (transactionContextFactory == null && transactionManager != null) {\n            transactionContextFactory = new SpringTransactionContextFactory(transactionManager, transactionSynchronizationAdapterOrder);\n        }\n    }\n\n    @Override\n    protected void initJpa() {\n        super.initJpa();\n        if (jpaEntityManagerFactory != null) {\n            sessionFactories.put(EntityManagerSession.class, new SpringEntityManagerSessionFactory(jpaEntityManagerFactory, jpaHandleTransaction, jpaCloseEntityManager));\n        }","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-spring/src/main/java/org/activiti/spring/SpringProcessEngineConfiguration.java#L66-L102","documentation":"Thrown by SpringProcessEngineConfiguration.createTransactionInterceptor when no Spring PlatformTransactionManager has been configured. The Spring integration requires a transaction manager to join engine commands into Spring transactions; otherwise it suggests using the standalone configuration instead.","triggerScenarios":"Building a process engine from SpringProcessEngineConfiguration without calling setTransactionManager(...) (e.g. missing PlatformTransactionManager bean wiring in spring XML or Java config).","commonSituations":"Spring config that defines the engine but forgot the DataSourceTransactionManager/JpaTransactionManager bean; copying a standalone config into a Spring setup; refactoring that removed the transaction manager bean.","solutions":["Wire a PlatformTransactionManager bean and inject it: cfg.setTransactionManager(transactionManager).","In XML, add <property name=\"transactionManager\" ref=\"transactionManager\"/> to the engine configuration bean.","If you do not need Spring-managed transactions, switch to StandaloneProcessEngineConfiguration as the message suggests.","Catch ActivitiException at startup to fail fast with guidance."],"exampleFix":"// before\nSpringProcessEngineConfiguration cfg = new SpringProcessEngineConfiguration();\ncfg.setDataSource(dataSource); // transactionManager missing\n// after\ncfg.setDataSource(dataSource);\ncfg.setTransactionManager(transactionManager);","handlingStrategy":"validation","validationCode":"SpringProcessEngineConfiguration cfg = ...;\nif (cfg.getTransactionManager() == null) throw new IllegalStateException(\"SpringProcessEngineConfiguration requires a transactionManager\");","typeGuard":null,"tryCatchPattern":"try { cfg.buildProcessEngine(); } catch (ActivitiException e) { log.error(\"Engine bootstrap failed: {}\", e.getMessage(), e); }","preventionTips":["Always inject a PlatformTransactionManager in Spring setups","Add an application-context smoke test that builds the engine at startup","Use StandaloneProcessEngineConfiguration when no Spring transactions are needed"],"tags":["spring","transactions","configuration"],"backgroundTag":"missing-required-config-field","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"}