Reputation: 3435
I have created a test Play 2.3 application with the help of activator
and the play-scala
template:
activator new test play-scala
This is build.sbt:
name := """test"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.1"
libraryDependencies ++= Seq(
jdbc,
anorm,
cache,
ws
)
In application.conf I've set up MySQL to be the database for the application:
db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://localhost:3306/*******?characterEncoding=UTF-8"
db.default.user=root
db.default.password="********"
When I type activator run
in console it starts the server on localhost and the port 9999 just fine. However, when I open the application in my browser I get the following error:
Configuration error
Driver not found: [com.mysql.jdbc.Driver]
What am I doing wrong?
Upvotes: 0
Views: 2230
Reputation: 53839
You need to add the mysql driver to your build.sbt
:
libraryDependencies += "mysql" % "mysql-connector-java" % "5.1.27"
Upvotes: 6