Camunda Process Engine init fails with error

Hi all,
We need your support, we get the following error when starting Camunda (7.8.0) on Tomcat server. We have a SpringBoot application which has @EnableProcessApplication. I just put below some relevant parts of the log, if you want the full stacktrace, let me know.

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.camunda.bpm.engine.spring.SpringProcessEngineServicesConfiguration’: Unsatisfied dependency expressed through field ‘processEngine’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘processEngineFactoryBean’: FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Task already scheduled or cancelled
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘processEngineFactoryBean’: FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Task already scheduled or cancelled
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:101)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1645)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getObjectForBeanInstance(AbstractAutowireCapableBeanFactory.java:1178)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:584)
… 82 more
Caused by: java.lang.IllegalStateException: Task already scheduled or cancelled
at java.util.Timer.sched(Timer.java:401)
at java.util.Timer.scheduleAtFixedRate(Timer.java:328)
at org.camunda.bpm.engine.impl.metrics.reporter.DbMetricsReporter.start(DbMetricsReporter.java:55)
at org.camunda.bpm.engine.impl.ProcessEngineImpl.(ProcessEngineImpl.java:119)
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:723)

Best regards,
Paul Palacean

Nevermind, it was a deployment issue, it is not Camunda related. We have renamed the class name of SpringBootApplication causing to have 2 SpringBootApplications in Tomcat. Maybe will serve as a reference for others that encounter this error.

Thanks.

how to resolve it? I got this problem too now.

I mean:how to rename the class name of SpringBootApplication?

Any help is greatly appreciated!

Hi,
Due to renaming we had 2 classes annotated with SpringBootApplication causing the application to fail to start in Tomcat. Cleaning the older files solved it.

Best regards,
Paul Palacean

:ok_hand:,thank you very much!

@ppalacean @HappyFeet
Hi Guys,

When i run my unit tests using springboottest , only then i get this error.
Can you pls. advice on this?

It’s fixed, moved test config to a separate class