13

I'm new with the play! framework and postgresql and I'm trying to make it work.

I read a lot of questions asked on stackoverflow and I searched a lot on google but I didn't manage to make it work.

Here is the error that Play! gives me :

Driver not found: [org.postgresql.Driver] 

My questions are :

1) Do you know an easy tutorial (i.e. that explains from the beginning) that shows how to configure play! to make postgresql work? I read a lot of thing but didn't find a detailed tutorial.

2) If not, here is my configuration :

I added this in application.conf :

db.default.driver=org.postgresql.Driver
db.default.url="jdbc:postgresql://127.0.0.1/postgres"
db.default.user=postgres
db.default.password=root

And in built.sbt :

libraryDependencies ++= Seq(
  jdbc,
  anorm,
  cache,
)  

What am I doing wrong?

1 Answer 1

23

As the documenation says, you have to add the driver to your dependencies:

libraryDependencies += "org.postgresql" % "postgresql" % "42.2.12"

Use the appropriate version of the driver for your Postgres installation.

http://www.playframework.com/documentation/2.3.x/ScalaDatabase

Sign up to request clarification or add additional context in comments.

1 Comment

For the latest dependency version see: mvnrepository.com/artifact/org.postgresql/postgresql

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.