cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure Activiti Explorer and REST to use the same database

ardamose123
Champ on-the-rise
Champ on-the-rise
I have fresh installations of activiti-explorer and activiti-rest running in a local Tomcat server. Both have exactly the same db.properties configuration (the original H2 database). However, any change I apply using Activiti Explorer is not reflected in the REST API (using curl), nor the other way aorund.

As a test, I started some processes in Explorer and tried to list them using the REST API, but active processes list, deployments and tasks method calls return empty. Using the REST API, I removed Gonzo from the Marketing group, but in Explorer Gonzo is still in it.

Is there a way in which I can tell Explorer and the REST API to use the very same H2 database? Or do I have to use a persistent one (Postgre, Oracle, MySQL…)?

Thanks in advance!
14 REPLIES 14

tunglk
Champ in-the-making
Champ in-the-making
Hi all,

I have a problem with config database for activiti-rest:
my db.properties:
db=h2
jdbc.driver=org.h2.Driver
#jdbc.url=jdbc:h2:mem:activiti;DB_CLOSE_DELAY=-1
jdbc.url=jdbc:h2:tcp://localhost/~/activiti
jdbc.username=sa
jdbc.password=

but when i start tomcat, activiti-rest can't start.
stdout of tomcat:
10:59:37,088 [localhost-startStop-1] WARN  org.springframework.web.context.support.AnnotationConfigWebApplicationContext  - Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoDataConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected org.activiti.engine.IdentityService org.activiti.rest.conf.DemoDataConfiguration.identityService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'identityService' defined in class path resource [org/activiti/rest/conf/ActivitiEngineConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.activiti.engine.IdentityService]: Factory method 'identityService' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine' defined in class path resource [org/activiti/rest/conf/ActivitiEngineConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.activiti.engine.ProcessEngine]: Factory method 'processEngine' threw exception; nested exception is java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngineFactoryBean': FactoryBean threw exception on object creation; nested exception is org.activiti.engine.ActivitiException: Could not update Activiti database schema: unknown version from database: '5.20.0.0'
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)


Someone can help me?

jbarrez
Star Contributor
Star Contributor
The exception says you have 5.20.0.0 as version. Are you running a snapshot version?

tunglk
Champ in-the-making
Champ in-the-making
I'm using 5.19.0 version in: http://activiti.org/download.html

vasile_dirla
Star Contributor
Star Contributor
@tunglk, maybe you used the same database with the snapshoot version and now you are trying to execute 5.19.0 on the same database ? (without cleaning it before)

What's happening if you use a fresh new database ?

tunglk
Champ in-the-making
Champ in-the-making
@vasile.dirla Thank you so much. I resolved it Smiley Very Happy