cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti Database Setup - 5.19.0.2

snehasissamal
Champ in-the-making
Champ in-the-making
Hi,

I have just started one POC on Activiti & able to run the explorer in Tomcat.
I created some users & groups but once the Tomcat is restarted I found that the users and groups I created are not there.

I have not done any changes respective to the database & its using the internal h2 DB.
I just want to retain my data if the Tomcat server is restarted also.

I am new in Activiti and have not familiar with Java as I am a .Net developer.
Please help.

Activiti Version: activiti-5.19.0.2
JDK: 8
apache-tomcat: 7.0.68


Thanks.

Kind Regards,
Snehasis
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
"I have not done any changes respective to the database & its using the internal h2 DB."

H2 is an in memory database. On a reboot, the JDK is killed and all data is gone. You have to switch to another (persistent) database if you want your data t survive reboots: http://activiti.org/userguide/index.html#activiti.setup.database

snehasissamal
Champ in-the-making
Champ in-the-making
Thanks jbarrez.

I went through the user guide but not clear what exactly needs to be done.
We have one standalone SQL Server database in one of the VM & I want to connect to that DB.

Here are the steps what I did.

Step 1:  Created a database "activiti" and given access to the default account sa as dbAdmin
Step 2: Made changes in "db.properties" file placed in "…activiti-explorer\WEB-INF\classes"

db=mssqljdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriverjdbc.url=jdbc:sqlserver://110.6.115.11:1433/activiti;DB_CLOSE_DELAY=1000
jdbc.username=sa
jdbc.password=Welcome1

Step 3: I restarted the Tomcat server & was expecting the default tables needs to be created in our SQL Server DataBase.

When I logged in the activiti explorer it was like as I logged in for the first time. But didnt find a single table in the Activiti database.

Am I missing something else ? Here are the activiti versions

Activiti Version: 5.19.0.2
JDK:8
apache-tomcat-7.0.68

I am new in activiti and need your help to fix the same.

Thanks

jbarrez
Star Contributor
Star Contributor
Changing db.properties should all you need to do .. the tables should be created automatically for you. Do you see any logging when booting up? It should give some sql server specific log lines (creating schema)