hi,
im trying to create a separate database for flowable tables in spring boot.since im facing some flyway issue.i added Process engine configuration as shown below.tables are getting create but facing bean creation exception pasted below. can you please help to correct where im going wrong in configuration.
DataSource flowableDataSource;
@Bean
ProcessEngine processEngine() {
ProcessEngine processEngine= SpringProcessEngineConfiguration.createStandaloneProcessEngineConfiguration()
.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE)
.setJdbcDriver("com.mysql.cj.jdbc.Driver")
.setJdbcUrl("jdbc:mysql://localhost:3306/flowable?nullCatalogMeansCurrent=true").setJdbcUsername("root")
.setJdbcPassword("root").buildProcessEngine();
flowableDataSource=processEngine.getProcessEngineConfiguration().getDataSource();
return processEngine;
}
@Bean
public EngineConfigurationConfigurer<SpringProcessEngineConfiguration> engineConfigurationConfigurer() {
return engineConfiguration -> engineConfiguration.setDataSource(flowableDataSource);
}
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘processAppEngineConfigurationConfigurer’ defined in class path resource [org/flowable/spring/boot/ProcessEngineAutoConfiguration$ProcessEngineAppConfiguration.class]: Unsatisfied dependency expressed through method ‘processAppEngineConfigurationConfigurer’ parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘processEngineConfigurator’ defined in class path resource [org/flowable/spring/boot/ProcessEngineAutoConfiguration$ProcessEngineAppConfiguration.class]: Unsatisfied dependency expressed through method ‘processEngineConfigurator’ parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘springProcessEngineConfiguration’ defined in class path resource [org/flowable/spring/boot/ProcessEngineAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flowable.spring.SpringProcessEngineConfiguration]: Factory method ‘springProcessEngineConfiguration’ threw exception; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘org.springframework.core.task.AsyncListenableTaskExecutor’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Qualifier(“applicationTaskExecutor”)}
2021-May-12 08:59:49.231 WARN [restartedMain] org.springframework.beans.factory.support.DisposableBeanAdapter.invokeCustomDestroyMethod.#349 - Destroy method ‘shutdown’ on bean with name.