Spray.io, slick, sqlite3: no suitable driver found
- You need to add the sqlite jdbc driver to your dependencies:
update your build.sbt to:
libraryDependencies ++= { val akkaV = "2.3.6" val sprayV = "1.3.2" Seq( "com.typesafe.akka" %% "akka-actor" % akkaV, "com.typesafe.akka" %% "akka-testkit" % akkaV % "test", "com.typesafe.slick" %% "slick" % "2.1.0", "io.spray" %% "spray-can" % sprayV, "io.spray" %% "spray-json" % "1.3.1", "io.spray" %% "spray-routing" % sprayV, "io.spray" %% "spray-testkit" % sprayV % "test", "org.slf4j" % "slf4j-nop" % "1.6.4", "org.specs2" %% "specs2-core" % "2.3.11" % "test", "org.xerial" % "sqlite-jdbc" % "3.7.2" // << SQLite JDBC Driver )}
2. Load the driver in your 'MyService' trait:
Class.forName("org.sqlite.JDBC") // load the sqlite jdbc driver (google for Class.forName) val db = Database.forURL(.....