Here is my postgres version postgresql/9.4.1
Here is my play version addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.6")
Here is my libraryDependencies
libraryDependencies ++= Seq(
jdbc,
cache,
ws,
specs2 % Test,
"postgresql" % "postgresql" % "9.1-901-1.jdbc4"
)
Changing version to 9.4-1201-jdbc41
gives sbt.ResolveException: unresolved dependency: postgresql#postgresql;9.4-1201-jdbc41: not found
Here is my application.conf
db.default.driver=org.postgresql.Driver
# I tried the following combination
#db.default.url="postgres://user:pass@localhost/20160210_scala_play"
# And
db.default.url="jdbc:postgresql://localhost/20160210_scala_play"
db.default.user="user"
db.default.password="pass"
All resulted in
`Cannot connect to database`
I verified that
psql \list
does contain
20160210_scala_play
with user=user password=password
Can someone point me a direction?
By default, postgresql will listen to port 5432
. So, Unless you sure about the fact that your postgre instance is running on port 80
, change your JDBC url to:
jdbc:postgresql://localhost:5432/20160210_scala_play
And also, this dependency was resolved for me:
"org.postgresql" % "postgresql" % "9.4-1206-jdbc42"
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