version 6 activiti-app and activiti-rest deployment problem on tomcat

pclaeys
Champ in-the-making
Champ in-the-making
Hi,
I'm just trying out the new activiti 6 beta1 and spent some time wondering about this strange behavior - maybe it's a bug ; or maybe some others might be helped when they encounter this issue:
What I did:
- using Tomcat7  and postrgres 9.3 as database
- downloaded activiti-rest and activiti-app ; and copied to the tomcat webapps filder; added postgres driver in the lib folder; and modified the two properties to point both applications to the the postgres database.

Then the weird behavior is:
- When both war's are present in the webapss folder; and THEN I start Tomcat, the deployment fails after 2 minutes on
Sep 08, 2015 2:27:01 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.activiti.servlet.WebConfigurer
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bootstrapper': Injection of autowired ……
… *********at lot of nested exectpions **********
….; nested exception is org.activiti.engine.ActivitiException: couldn't check if tables are already present using metadata: Connections could not be acquired from the underlying database!

- When only activti-rest.war is present in the webapps folder; then I start tomcat; deployment is fine.
While leaving tomcat running, and I then copy the activiti-app.war to the webapps folder; it is also deployed correctly and everything works.

It feels a bit like a race condition or a locking problem, so I tried configuring both webapps so they use a different postgres database (both on the same instance on my local machine, though). That didn't make a difference.
It got me wondering though: are activiti-app and activiti-rest supposed to point to the same database? (there is a forum thread where someone claims the opposite - but I would be surprised by this - see http://forums.activiti.org/content/postgres-db-error-upon-restarting-activiti-app).

Not urgent for me; but if someone has any toughts on what might be the cause, that might clear some fog.

Apart from this issue: very nice gui in the activiti-app , congrats!



5 REPLIES 5

trademak
Star Contributor
Star Contributor
It looks like the activiti app is not configured with a correct database. It can't get a connection from the configured database at least. Did you read my blog post?

http://bpmn20inaction.blogspot.com/2015/09/getting-started-with-new-activiti-6-ui.html

Best regards,

I got the exact same problem, even if I dont change the activiti-app.war (so it also fails to deploy with h2-in-memory).

Also: Your blog link seems to be not there anymore.

Is there any source I can get some more information on this?

spille
Champ in-the-making
Champ in-the-making
I encountered the same erros/problem and it was indeed due to bad database config.

Note that the database config is slightly different between the activiti-rest and activiti-app (you cannot just copy past the db config):
- activiti-app/WEB-INF/classes/META-INF/activiti-app/activiti-app.properties
datasource.driver=org.postgresql.Driver
datasource.url=jdbcSmiley Tongueostgresql://HOST/db
datasource.username=aaaa
datasource.password=aaaa

- /activiti-rest/WEB-INF/classes/db.properties
jdbc.driver=org.postgresql.Driver
jdbc.url=jdbcSmiley Tongueostgresql://HOST/db
jdbc.username=aaaa
jdbc.password=aaaa

Cheers,

Spille

k82cn
Champ in-the-making
Champ in-the-making

One question, when making activiti-app & activiti-rest point to the same db, it report table conflict, how to resolve it?

amitbhoyar
Champ in-the-making
Champ in-the-making

if you have looked closely to in memory database you could have find that  it users a different schema/database for activiti-admin and activiti-app . activiti-app and activiti-rest can point to same database. I tried creating same I It worked for me. also make sure not to run the insert query,let the app create the database table for you