Yesterday I had some problems with routes in my Play 2.1.1 app and deleted the contents of the target folder to force Play to recompile everything (probably a dumb idea).
Now I get a bunch of errors in Eclipse:
too many arguments for method apply: (name: String, constraint: String)play.core.DynamicPart in object DynamicPart routes_routing.scala /myapp/target/scala-2.10/src_managed/main line 44 Scala Problem
too many arguments for method apply: (name: String, constraint: String)play.core.DynamicPart in object DynamicPart routes_routing.scala /myapp/target/scala-2.10/src_managed/main line 40 Scala Problem
too many arguments for method apply: (name: String, constraint: String)play.core.DynamicPart in object DynamicPart routes_routing.scala /myapp/target/scala-2.10/src_managed/main line 52 Scala Problem
too many arguments for method apply: (name: String, constraint: String)play.core.DynamicPart in object DynamicPart routes_routing.scala /myapp/target/scala-2.10/src_managed/main line 48 Scala Problem
not found: value params routes_routing.scala /myapp/target/scala-2.10/src_managed/main line 96 Scala Problem
not found: value params routes_routing.scala /myapp/target/scala-2.10/src_managed/main line 88 Scala Problem
not found: value params routes_routing.scala /myapp/target/scala-2.10/src_managed/main line 112 Scala Problem
not found: value params routes_routing.scala /myapp/target/scala-2.10/src_managed/main line 104 Scala Problem
After some google and stackoverflow research I tried to perform a play clean compile
on the project. That works. I can also start the application and it seems to work properly.
After the clean I tried a Refresh in Eclipse. That does not change anything. The errors won't go away.
Any suggestions?
Thanks!
Guess I found it:
First I ran
play clean-all
.But I guess this is what really helped me:
I deleted the Eclipse project (In Eclipse right click > delete; without checking "delete contents on disk"). Then I ran
play eclipse
and imported the project into Eclipse.You need to regenerate the eclipse project
Start play
Generate eclipse project (perform this step inside play console)
Refresh your eclipse project
You don't have to delete the eclipse project every time you make important changes :-)