cancel
Showing results for 
Search instead for 
Did you mean: 

Error creating bean with name 'init' defined in class com.bizruntime.activiti.SpringBootWithActiviti

krishan_deo
Champ in-the-making
Champ in-the-making
Hiii
I am getting following error in Activiti with Spring Boot, I changed my DB with mysql. I am very new in activiti as well BPM, I just created same example which is on Activiti User guide. Please help me…

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'init' defined in class com.bizruntime.activiti.SpringBootWithActiviti: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.activiti.engine.RepositoryService]: : Error creating bean with name 'repositoryServiceBean' defined in class path resource [org/activiti/spring/boot/DataSourceProcessEngineAutoConfiguration$DataSourceProcessEngineConfiguration.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.activiti.engine.ProcessEngine]: : Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.activiti.engine.ActivitiException: Could not update Activiti database schema: unknown version from database: '5.20.0.0'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.activiti.engine.ActivitiException: Could not update Activiti database schema: unknown version from database: '5.20.0.0'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'repositoryServiceBean' defined in class path resource [org/activiti/spring/boot/DataSourceProcessEngineAutoConfiguration$DataSourceProcessEngineConfiguration.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.activiti.engine.ProcessEngine]: : Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.activiti.engine.ActivitiException: Could not update Activiti database schema: unknown version from database: '5.20.0.0'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.activiti.engine.ActivitiException: Could not update Activiti database schema: unknown version from database: '5.20.0.0'
   at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:747)
   at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:462)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1094)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:989)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)
   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
   at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
   at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
   at org.springframework.boot.SpringApplication.run(SpringApplication.java:952)
   at org.springframework.boot.SpringApplication.run(SpringApplication.java:941)
   at com.bizruntime.activiti.SpringBootWithActiviti.main(SpringBootWithActiviti.java:25)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'repositoryServiceBean' defined in class path resource [org/activiti/spring/boot/DataSourceProcessEngineAutoConfiguration$DataSourceProcessEngineConfiguration.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.activiti.engine.ProcessEngine]: : Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.activiti.engine.ActivitiException: Could not update Activiti database schema: unknown version from database: '5.20.0.0'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.activiti.engine.ActivitiException: Could not update Activiti database schema: unknown version from database: '5.20.0.0'
   at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:747)
   at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:462)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1094)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:989)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1017)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:960)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:858)
   at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:811)
   at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:739)


Thanks
1 REPLY 1

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Krishan,

the problem is

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.activiti.engine.ActivitiException: Could not update Activiti database schema: unknown version from database: '5.20.0.0'

You have to have code and DB schema in synch. (one of the solutions is to drop and recreate DB schema again)

Regards
Martin