我已經下載了最新的活動源代碼。我已經更改了db.properties文件,如下所示:PostgresSqlException與activiti源代碼
db=postgres
jdbc.driver=org.postgresql.Driver
jdbc.url=jdbc:postgresql://localhost:5432/WorkflowEngine
jdbc.username=postgres
jdbc.password=password
我也添加了postgres依賴項。雖然我試圖通過'intellij idea'進行部署,但通過指向正確的數據庫,使用相同的代碼,我創建了一個war文件,並試圖通過將war放入webapps直接部署tomcat。 在這裏,我發現了異常,如:
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
誰能幫我解決這個錯誤。
UPDATE
我已經給了一個新的數據庫名稱,並試圖啓動。 Activiti能夠在新的數據庫中創建25個表格,但仍然會導致拒絕連接錯誤。
可以肯定的是:所有的IntelliJ,Postgres **和** Tomcat都運行在同一臺機器上? –
是的,所有的都在同一臺機器上運行 –
db.properties文件怎麼樣 - 它在tomcat可以加載它的地方嗎? –