import org.eclipse.jetty.client.HttpClient...get("/get-url/:url") {
val url = params("url")
val myResponse = new HttpClient().GET(url)
"done"
}
And this is the error:
org.fusesource.scalate.TemplateException: scala.tools.nsc.Global$gen$.mkBlock(Lscala/collection/immutable/List;)Lscala/reflect/internal/Trees$Tree;
I read that these errors are normally caused by mixing scala versions but I have only added a Java library? This is my build.scala:
val ScalaVersion = "2.11.7"
val ScalatraVersion = "2.4.0-RC2-2"
...
libraryDependencies ++= Seq(
"org.scalatra" %% "scalatra" % ScalatraVersion,
"org.scalatra" %% "scalatra-scalate" % ScalatraVersion,
"org.eclipse.jetty" % "jetty-client" % "9.2.10.v20150310", // Added by me
"org.scalatra" %% "scalatra-specs2" % ScalatraVersion % "test",
"ch.qos.logback" % "logback-classic" % "1.1.2" % "runtime",
"org.eclipse.jetty" % "jetty-webapp" % "9.2.10.v20150310" % "container",
"javax.servlet" % "javax.servlet-api" % "3.1.0" % "provided"
)
Does anyone have any idea what is happening here? Thanks!
org.fusesource.scalate.TemplateException: scala.tools.nsc.Global$gen$.mkBlock(Lscala/collection/immutable/List;)Lscala/reflect/internal/Trees$Tree;--
You received this message because you are subscribed to the Google Groups "scalatra-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalatra-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
dependencyOverrides := Set(
"org.scala-lang" % "scala-library" % ScalaVersion,
"org.scala-lang" % "scala-reflect" % ScalaVersion,
"org.scala-lang" % "scala-compiler" % ScalaVersion
),Hey,
this looks like a SBT issue (incremental compilation and scala-reflect), upgrading SBT to 0.13.8 should resolve it.
Regards, Stefan