I am trying to run a clone of the play project that I got from git clone https://github.com/djonmayer/play21-osm.git
I have play version 2.2.2 and scala version 2.10.4 installed.
When I type play in the directory that the project clones to I get the following error:
java.lang.NoSuchMethodError: scala.Predef$.augmentString(Ljava/lang/String;)Lscala/collection/immutable/StringOps;
at sbt.ConsoleLogger$.<init>(ConsoleLogger.scala:129)
at sbt.ConsoleLogger$.<clinit>(ConsoleLogger.scala)
at sbt.StandardMain$.<init>(Main.scala:52)
at sbt.StandardMain$.<clinit>(Main.scala)
at sbt.xMain.run(Main.scala:26)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:57)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:77)
at xsbt.boot.Launch$.run(Launch.scala:57)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
at xsbt.boot.Launch$.launch(Launch.scala:65)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Boot$.runImpl(Boot.scala:32)
at xsbt.boot.Boot$.main(Boot.scala:21)
at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.lang.NoSuchMethodError: scala.Predef$.augmentString(Ljava/lang/String;)Lscala/collection/immutable/StringOps;
This is true if I run play clean
. I have read this may be a dependencies issue so I have tried adding the line scalaVersion := "2.10.4"
to the play.Project.settings
section of Build.scala and separately in a build.sbt file. It didn't work.
I tried to put this in a comment but it was unreadable.
Thanks, zeppaman. It does look like this issue is to do with running a Play Framework project that was created in an older version of Play. By looking at another project that had commits for upgrading to a new play version I made the following changes.
In build.properties:
sbt.version=0.12.2
became:
sbt.version=0.13.0
In plugins.sbt:
addSbtPlugin("play" % "sbt-plugin" % "2.1.1")
became:
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.2")
This enabled me to get to play update then throws the errors:
[error] Modules were resolved with conflicting cross-version suffixes in {file:/Users/michaelrichardson/Documents/Play/play21-osm/}play21-osm:
[error] org.scala-stm:scala-stm _2.10, _2.10.0
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) Conflicting cross-version suffixes in: org.scala-stm:scala-stm
I change the line in Build.scala:
"com.typesafe.play" %% "play-slick" % "0.3.2"
became:
"com.typesafe.play" %% "play-slick" % "0.5.0.2-SNAPSHOT"
EXTRA: This changes the error to:
[info] Resolving com.typesafe.play#play-slick_2.10;0.5.0.2-SNAPSHOT ...
[warn] module not found: com.typesafe.play#play-slick_2.10;0.5.0.2-SNAPSHOT
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/com/typesafe/play/play-slick_2.10/0.5.0.2-SNAPSHOT/play-slick_2.10-0.5.0.2-SNAPSHOT.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.typesafe.play#play-slick_2.10;0.5.0.2-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.play#play-slick_2.10;0.5.0.2-SNAPSHOT: not found
UPDATE: Solved unresolved dependency
The problem of unresolved dependencies seems like it may have been due to my local sbt/ivy repositories getting corrupted. See unresolved dependency: com.typesafe.play#play-slick_2.10;0.6.0.1: not found
This kind of problem is often relate to two similar prolbem:
So check if scala and play version are compatible and if You have included a jar that already contains the class with missing method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With