Reputation: 2679
Im having strange problem while using new slick version with mysql:
[RuntimeException: java.lang.NoSuchMethodError: slick.driver.JdbcProfile$API.streamableQueryActionExtensionMethods(Lslick/lifted/Query;)Lslick/profile/BasicActionComp$$$$6aa48549c0a7603df1fa229cf7177493$$$$sionMethodsImpl;]
in my application.conf:
slick.dbs.default.driver = "slick.driver.MySQLDriver$"
slick.dbs.default.db.driver = "com.mysql.jdbc.Driver"
slick.dbs.default.db.url = "jdbc:mysql://localhost/test?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&useSSL=false"
slick.dbs.default.db.user = "root"
slick.dbs.default.db.password = ""
and code:
throwing exception:
Await.result(db.run(table.result), Duration.Inf)
evolutions did good job, tables created etc. But here I have such nasty error ;/
My built.sbt:
name := """bettor"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.8"
val utilsDeps = Seq("joda-time" % "joda-time" % "2.9.4",
"com.github.tototoshi" %% "slick-joda-mapper" % "2.2.0",
"org.joda" % "joda-convert" % "1.8.1")
val dbsDeps = Seq("com.typesafe.play" %% "play-slick" % "2.0.0",
"com.typesafe.play" %% "play-slick-evolutions" % "2.0.0",
"mysql" % "mysql-connector-java" % "6.0.2")
val jsonDeps = Seq("org.json4s" %% "json4s-jackson" % "3.4.0",
"org.jsoup" % "jsoup" % "1.9.2")
libraryDependencies ++= Seq(
cache,
ws,
"org.scalatestplus.play" %% "scalatestplus-play" % "1.5.1" % Test
) ++ utilsDeps ++ dbsDeps ++ jsonDeps
resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"
Any ideas how to solve this issue ?
even using this template without changing anything I have same error :(
Upvotes: 2
Views: 389
Reputation: 474
In my case, I used Seq("-Xmax-classfile-name","78")
feature suggested here https://stackoverflow.com/a/32862972/1432640 without reading the comments (this case was mentioned there), and was struggling with the error for 4+ hours. Nightmare is over! Smeagol is free!
Upvotes: 4
Reputation: 2679
Heh, adding to build sbt:
scalacOptions := Seq("-feature")
resolved problem.
Upvotes: 0