I have downloaded the latest source code of activity. I have changed the db.properties file as follows :
db=postgres
jdbc.driver=org.postgresql.Driver
jdbc.url=jdbc:postgresql://localhost:5432/WorkflowEngine
jdbc.username=postgres
jdbc.password=password
I have added the postgres dependency also. While I'm trying to deploy through 'intellij idea' it is working fine by pointing to the correct database,with the same code, I have created a war file and tried to deploy through tomcat directly by placing the war inside webapps. Here I'm getting the exception like :
caused by: org.activiti.engine.ActivitiException: couldn't check if tables are already present using metadata: connection refused. check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections
caused by: org.postgresql.util.PSQLException: connection refused. check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections
Can anyone help me to resolve this error.
UPDATE
I have given a new database name and tried to start. Activiti is able to create 25 tables in the new database, but still gives the connection refused error.

The problem is pretty clearly a jdbc connection refused error. So let's start with a checklist for troubleshooting these.
Can you psql into the server on a local socket? just type psql from the command line. If you get an authentication error or a password prompt you are good. If you get a connection refused you have more work to do.
Is PostgreSQL running? If not, start it and try again. If so, check the postgresql.conf to look for non-standard port settings.
Check firewalls that might be preventing network connections.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With