I have following code. I'm using Play 2.3.7, Scala 2.11.4, PostgreSQL 9.4.1.
I get error execute following code:-
val dburl: Option[String] = current.configuration.getString("db.default.url")
val driver: Option[String] = current.configuration.getString("db.default.driver")
val db = Database.forURL(dburl.get, driver.get)
val session = db.createSession()
def newPlayer(email: String, nickname: String): Int = {
val now : java.sql.Timestamp = new java.sql.Timestamp(compat.Platform.currentTime)
// following line throws exception
db.withSession {implicit session: Session => persons.map(p => (p.nickname, p.email, p.status, p.gender, p.created, p.updated)) += (nickname, email, "active", "n", now, now)}
}
Execution exception
[PSQLException: FATAL: role "org.postgresql.Driver" does not exist]
I think my url, driver is ok. Otherwise I would have error in earlier code. Please advice me how to fix it.