Hi,
I want to use different configuration file for testing consisting of h2 DB.
My main application has camunda.cfg.xml which uses real DB viz. MySQL.
when I run my test class, I see
17:39:15.901 [main] ERROR o.c.b.e.context -
ENGINE-16004 Exception while closing command context: no processes deployed with key 'my-process': processDefinition is null
org.camunda.bpm.engine.exception.NullValueException: no processes deployed with key 'my-process': processDefinition is null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_112]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_112]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_112]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_112]
at org.camunda.bpm.engine.impl.util.EnsureUtil.generateException(EnsureUtil.java:334) ~[oracle-camunda-engine-7.5.0.jar:7.5.0]
at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotNull(EnsureUtil.java:49) ~[oracle-camunda-engine-7.5.0.jar:7.5.0]
When I check the log, I see Process Engine is getting initiated twice.
7:39:13.152 [main] INFO o.c.b.engine -
ENGINE-00003 Initializing process engine for resource file:/D:/Project/LoanApproval/target/classes/camunda.cfg.xml
ENGINE-00004 Initializing process engine default
17:39:14.927 [main] INFO o.c.b.engine -
ENGINE-00003 Initializing process engine for resource file:/D:/Project/LoanApproval/target/test-classes/camunda.cfg.xml
I tried
public ProcessEngineRule processEngineRule = new ProcessEngineRule("test.camunda.cfg.xml");
But no luck. Is there a way to load specific configuration file by ProcessEngineRule?
Any example will be a great help.
Thanks,
Suhas Madap.