Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play framework 2.2 Slick dependency issue

I'm trying to follow this tutorial, but I get stuck as soon as trying to import necessary packages:

import scala.slick.session.Database
import Database.threadLocalSession
import scala.slick.jdbc.{GetResult, StaticQuery => Q}

I'm getting these errors:

object slick is not a member of package scala
not found: object Database
object slick is not a member of package scala

My SBT dependencies:

libraryDependencies ++= Seq(
  jdbc,
  anorm,
  cache,
  "com.typesafe.slick" %% "slick" % "1.0.1",
  "com.typesafe.play" %% "play-slick" % "0.5.0.8"
)     

What am I missing here?

I'm running Play Framework 2.2.0, Scala 2.10.3

like image 364
Caballero Avatar asked Jan 18 '26 05:01

Caballero


1 Answers

You probably need to run some of these commands in sbt (in this order):

reload
update
eclipse

(obviously substitute eclipse with whatever IDE you are using, or remove it if you are not using an IDE.)

like image 114
Robin Green Avatar answered Jan 20 '26 19:01

Robin Green