Factory method 'cmmnEngine' threw exception; nested exception is java.lang.IllegalStateException: CMMN engine has not been initialized

Hi ,
I tried to start via spring boot with the very simple application below, but the got error.

====================application==================================
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class MyApplication {
public static void main(String[] args) {
SpringApplication.run(MyApplication.class, args);
}
}

=================error log================================================
rg.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘cmmnEngine’ defined in class path resource [org/flowable/spring/boot/cmmn/CmmnEngineServicesAutoConfiguration$AlreadyInitializedEngineConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flowable.cmmn.engine.CmmnEngine]: Factory method ‘cmmnEngine’ threw exception; nested exception is java.lang.IllegalStateException: CMMN engine has not been initialized
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:591) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1246) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1096) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:535) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-5.0.12.RELEASE.jar:5.0.12.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:548) ~[spring-context-5.0.12.RELEASE.jar:5.0.12.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) [spring-boot-2.0.8.RELEASE.jar:2.0.8.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386) [spring-boot-2.0.8.RELEASE.jar:2.0.8.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-2.0.8.RELEASE.jar:2.0.8.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1242) [spring-boot-2.0.8.RELEASE.jar:2.0.8.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1230) [spring-boot-2.0.8.RELEASE.jar:2.0.8.RELEASE]
at org.flowable.MyApplication.main(MyApplication.java:10) [classes/:na]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flowable.cmmn.engine.CmmnEngine]: Factory method ‘cmmnEngine’ threw exception; nested exception is java.lang.IllegalStateException: CMMN engine has not been initialized
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:583) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
… 17 common frames omitted
Caused by: java.lang.IllegalStateException: CMMN engine has not been initialized
at org.flowable.spring.boot.cmmn.CmmnEngineServicesAutoConfiguration$AlreadyInitializedEngineConfiguration.cmmnEngine(CmmnEngineServicesAutoConfiguration.java:74) ~[flowable-spring-boot-autoconfigure-6.4.1.jar:6.4.1]
at org.flowable.spring.boot.cmmn.CmmnEngineServicesAutoConfiguration$AlreadyInitializedEngineConfiguration$$EnhancerBySpringCGLIB$$ae9eb8a6.CGLIB$cmmnEngine$0() ~[flowable-spring-boot-autoconfigure-6.4.1.jar:6.4.1]
at org.flowable.spring.boot.cmmn.CmmnEngineServicesAutoConfiguration$AlreadyInitializedEngineConfiguration$$EnhancerBySpringCGLIB$$ae9eb8a6$$FastClassBySpringCGLIB$$b7051b90.invoke() ~[flowable-spring-boot-autoconfigure-6.4.1.jar:6.4.1]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-5.0.12.RELEASE.jar:5.0.12.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:365) ~[spring-context-5.0.12.RELEASE.jar:5.0.12.RELEASE]
at org.flowable.spring.boot.cmmn.CmmnEngineServicesAutoConfiguration$AlreadyInitializedEngineConfiguration$$EnhancerBySpringCGLIB$$ae9eb8a6.cmmnEngine() ~[flowable-spring-boot-autoconfigure-6.4.1.jar:6.4.1]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_192]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_192]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_192]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_192]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
… 18 common frames omitted

====================pom.xml==========================

<?xml version="1.0" encoding="UTF-8"?>


org.flowable
spring_boot
pom
0.0.1-SNAPSHOT

<modelVersion>4.0.0</modelVersion>

<properties>
    <flowable.version>6.4.1</flowable.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.flowable</groupId>
        <artifactId>flowable-spring-boot-starter</artifactId>
        <version>${flowable.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-core</artifactId>
        <version>5.0.11.RELEASE</version>
    </dependency>

    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>1.3.176</version>
    </dependency>
</dependencies>

Hey @dioscoreae, this is a really weird error. This should not be happening.

Can you please set the debug property to true in your application.properties and sends us the output of the configuration report? This would help us analyse the problem.

If you can also create a minimal working example then it would be even easier :slight_smile:.

Thanks,
Filip