1
votes

i'm trying to migrate my play application from version 2.3.10 to 2.4 (i use Java). I'm followed the migration guide on the play homepage, but there occurs an error with sbt. What i've done so far: - change the scala version in build.sbt to 2.11.6 - change the play version to 2.4.0 in plugins.sbt - change the sbt.version in build.properties to 0.13.8

After the build.sbt refresh i get the following error:

java.lang.RuntimeException: No project '...' in 'file:/...'.Valid project IDs: root
at scala.sys.package$.error(package.scala:27)
at sbt.Load$$anonfun$checkAll$2$$anonfun$apply$13.apply(Load.scala:370)
at sbt.Load$$anonfun$checkAll$2$$anonfun$apply$13.apply(Load.scala:365)
at scala.collection.immutable.List.foreach(List.scala:318)
at sbt.Load$$anonfun$checkAll$2.apply(Load.scala:365)
at sbt.Load$$anonfun$checkAll$2.apply(Load.scala:365)
at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:772)
at scala.collection.immutable.Map$Map1.foreach(Map.scala:109)
at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:771)
at sbt.Load$.checkAll(Load.scala:365)
at sbt.Load$.loadURI(Load.scala:290)
at sbt.Load$.load(Load.scala:285)
at sbt.Load$.load(Load.scala:276)
at sbt.Load$.apply(Load.scala:130)
at sbt.Load$.defaultLoad(Load.scala:36)
at sbt.BuiltinCommands$.doLoadProject(Main.scala:481)
at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:475)
at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:475)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
at sbt.Command$.process(Command.scala:92)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
at sbt.State$$anon$1.process(State.scala:184)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.MainLoop$.next(MainLoop.scala:98)
at sbt.MainLoop$.run(MainLoop.scala:91)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:70)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:65)
at sbt.Using.apply(Using.scala:24)
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:65)
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:48)
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:32)
at sbt.MainLoop$.runLogged(MainLoop.scala:24)
at sbt.StandardMain$.runManaged(Main.scala:53)
at sbt.xMain.run(Main.scala:28)
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)

It seems that sbt can't find the subprojects, but i don't know how i can solve this error. By the way the application works seamlessly on 2.3.10.

I hope somebody can help me! Thanks in advance.

2

2 Answers

0
votes

Plese look at the answer to this question

Can't use sbt 0.13.7 with Play subprojects

It looks very similar. If you have current sbt version 0.13.5 then I am pretty sure that this is exactly yours problem

0
votes

Try adding these to plugins.sbt file;

resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.3")

I suggest you to use 2.4.3 if you will upgrade your Play version, it should be the latest one. Besides, follow this guideline, than you should be fine.