org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource
that definitely indicates there is a problem connecting to the database. To confirm you built the .war file with the correct credentials, you can look at the WebAPI.war file in /Users/tankh/tomcat/webapps/WebAPI.war, look at the file called ‘application.properties’ under the /WEB-INF/classes folder under the .war root. If that file contains the correct settings for your environment, looking like this:
#Primary DataSource
datasource.driverClassName=${datasource.driverClassName}
datasource.url=${datasource.url}
datasource.username=${datasource.username}
datasource.password=${datasource.password}
datasource.dialect=${datasource.dialect}
datasource.ohdsi.schema=${datasource.ohdsi.schema}
datasource.dialect.source=${datasource.dialect.source}
...
#Flyway database change management.
#DataSource for Change Managment / Migration
flyway.enabled=true
flyway.datasource.driverClassName=${datasource.driverClassName}
flyway.datasource.url=${datasource.url}
flyway.datasource.username=${flyway.datasource.username}
flyway.datasource.password=${flyway.datasource.password}
The values to your server should be replaced with the real values in your war’s /WEB-INF/classes/application.properties file.
As a secondary test, you should try to connect using a JDBC client to your postgresql server using something like ‘SqlWorkbench’. It could be somethign malformed in your jdbc url.
-Chris