I created a new project with Spring Boot and the camunda-bpm-spring-boot-starter.
I usually use an in-memory HSQLDB within integration tests. But when the tests are executed with a HSQLDB and Camunda, the spring context fails to start:
Caused by: org.camunda.bpm.engine.exception.NullValueException: couldn't deduct database type from database product name 'HSQL Database Engine': databaseType is null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_60]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_60]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_60]
at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[na:1.8.0_60]
at org.camunda.bpm.engine.impl.util.EnsureUtil.generateException(EnsureUtil.java:334) ~[camunda-engine-7.5.0.jar:7.5.0]
at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotNull(EnsureUtil.java:49) ~[camunda-engine-7.5.0.jar:7.5.0]
at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotNull(EnsureUtil.java:44) ~[camunda-engine-7.5.0.jar:7.5.0]
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.initDatabaseType(ProcessEngineConfigurationImpl.java:934) ~[camunda-engine-7.5.0.jar:7.5.0]
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.initDataSource(ProcessEngineConfigurationImpl.java:885) ~[camunda-engine-7.5.0.jar:7.5.0]
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:647) ~[camunda-engine-7.5.0.jar:7.5.0]
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:612) ~[camunda-engine-7.5.0.jar:7.5.0]
at org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:63) ~[camunda-engine-spring-7.5.0.jar:7.5.0]
at org.camunda.bpm.engine.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:51) ~[camunda-engine-spring-7.5.0.jar:7.5.0]
at org.camunda.bpm.engine.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:31) ~[camunda-engine-spring-7.5.0.jar:7.5.0]
With the property camunda.bpm.database.type = hsqldb
there is another exception:
Caused by: org.camunda.bpm.engine.ProcessEngineException: Error while building ibatis SqlSessionFactory: null
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactory(ProcessEngineConfigurationImpl.java:1030) ~[camunda-engine-7.5.0.jar:7.5.0]
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:649) ~[camunda-engine-7.5.0.jar:7.5.0]
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:612) ~[camunda-engine-7.5.0.jar:7.5.0]
at org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:63) ~[camunda-engine-spring-7.5.0.jar:7.5.0]
at org.camunda.bpm.engine.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:51) ~[camunda-engine-spring-7.5.0.jar:7.5.0]
at org.camunda.bpm.engine.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:31) ~[camunda-engine-spring-7.5.0.jar:7.5.0]
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168) ~[spring-beans-4.2.8.RELEASE.jar:4.2.8.RELEASE]
... 52 common frames omitted
Caused by: java.lang.NullPointerException: null
at java.util.Hashtable.put(Hashtable.java:459) ~[na:1.8.0_60]
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactoryProperties(ProcessEngineConfigurationImpl.java:1040) ~[camunda-engine-7.5.0.jar:7.5.0]
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactory(ProcessEngineConfigurationImpl.java:1013) ~[camunda-engine-7.5.0.jar:7.5.0]
... 58 common frames omitted
So how can I use Camunda with an in-memory HSQLDB?
HSQLDB is not supported by Camunda (see https://docs.camunda.org/manual/7.6/introduction/supported-environments/#databases).
If you need an in-memory database please use H2 (http://www.h2database.com/) instead.