Using Flowable on top of oracle db

Hi.

My team has been using activiti 5.21 and we’re not testing to see if we can easily move over to flowable.
I’ve been running flowable out of the box with the h2 database. Then I’ve made the necessary changes to flowable-custom-context.xml to run it on oracle database instead. I’ve been using the similar spring setup we used in activiti.
When I then try to start flowable-rest in my tomcat instance I keep getting and exception:

SEVERE: Exception sending context initialized event to listener instance of class org.flowable.rest.servlet.WebConfigurer
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dmnEngineConfiguration’ defined in class path resource [org/flowable/rest/conf/FlowableEngineConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flowable.dmn.api.DmnEngineConfigurationApi]: Factory method ‘dmnEngineConfiguration’ threw exception; nested exception is java.lang.ClassCastException: org.flowable.spring.ProcessEngineFactoryBean$$EnhancerBySpringCGLIB$$da38e03d cannot be cast to org.flowable.engine.ProcessEngine
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
at org.flowable.rest.servlet.WebConfigurer.contextInitialized(WebConfigurer.java:46)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flowable.dmn.api.DmnEngineConfigurationApi]: Factory method ‘dmnEngineConfiguration’ threw exception; nested exception is java.lang.ClassCastException: org.flowable.spring.ProcessEngineFactoryBean$$EnhancerBySpringCGLIB$$da38e03d cannot be cast to org.flowable.engine.ProcessEngine
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
… 25 more
Caused by: java.lang.ClassCastException: org.flowable.spring.ProcessEngineFactoryBean$$EnhancerBySpringCGLIB$$da38e03d cannot be cast to org.flowable.engine.ProcessEngine
at org.flowable.rest.conf.FlowableEngineConfiguration$$EnhancerBySpringCGLIB$$cb8d4062.processEngine()
at org.flowable.rest.conf.FlowableEngineConfiguration.dmnEngineConfiguration(FlowableEngineConfiguration.java:77)
at org.flowable.rest.conf.FlowableEngineConfiguration$$EnhancerBySpringCGLIB$$cb8d4062.CGLIB$dmnEngineConfiguration$12()
at org.flowable.rest.conf.FlowableEngineConfiguration$$EnhancerBySpringCGLIB$$cb8d4062$$FastClassBySpringCGLIB$$371e8a3c.invoke()
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
at org.flowable.rest.conf.FlowableEngineConfiguration$$EnhancerBySpringCGLIB$$cb8d4062.dmnEngineConfiguration()
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
… 26 more

I’ve tried to set the flowable-custom-context to be the same as the one provided in the flowable-rest war, and only changing the datasource.
Does that exception tell anyone what could be missing?

Also, I’ve been wondering whether the problem is that the database doesn’t contain the ACT_DMN*** tables. However, since I have to create these manually in a script executed by database admin, then I can’t use the database schema update method. I haven’t found any database script for ACT_DMN tables anywhere, also not mentioned anywhere in the code on github.
Could you make the ACT_DMN* tables available in a similar way as the other sql scripts?

The DMN tables are indeed automatically created using Liquibase. Currently, those sql files are not generated. We’ll look into how to automatically generate those for inclusion in the download and update this post with our findings.

FYI: the latest 6.2.0 release zip contain the DDL create and upgrade files for all engines