Play Framework 2.2 in IntelliJ, errors in controllers everywhere 8

Posted by Jens Jäger on September 24, 2013

Today I updated an application to Play Framework 2.2. After the creation of the IntelliJ config with “play idea”, I got errors in every reverse route and content call. Here are some examples how the errors locked like:



After fiddling around a bit I found out that the routes_routing.scala and the routes_reverseRouting.scala had errors to. Hmm this is weird. A look in the module setting (Click on the project folder -> Open Module Settings) provided me this:


As you can see the folder target/scala-2.10/…/main is not a source folder. Only the underlying controllers and views folder. To fix the errors in the controllers just add “main” to the source folders and remove “controllers” and “views”.

Here is a screenshot how the fixed configurations should look like:


Now the controllers should be fine. Happy coding!


Use this link to trackback from your own site.


Leave a response

  1. Tom Sun, 08 Dec 2013 03:42:33 CET

    THANK YOU!!! This has been driving me crazy

  2. ChrisDebug Sat, 22 Feb 2014 03:56:31 CET

    Yes! I too was having problems. Now, I have a new problem.

    After making the changes, “routes” is fixed but now “index()” is red. ugh!

  3. Alexey Zvolinskiy Tue, 01 Apr 2014 22:08:31 CEST

    You finished my pains

  4. Vinnie1991 Sun, 18 May 2014 15:44:07 CEST

    My hero!
    I hate that the IDE said “problems?”, but that it works.


  5. Jens Sun, 18 May 2014 22:07:44 CEST

    Thank you all for your comments.

  6. Brian Z Tue, 28 Oct 2014 19:09:49 CET

    This is spot on! Can’t believe after all this time this is still an issue (1 year later). JetBrains get your stuff together! (Thanks Jens!)

  7. rafiozo Fri, 16 Jan 2015 09:55:36 CET

    THX! You helped me ;) Thank you.

  8. Adrian Fri, 07 Aug 2015 06:36:28 CEST

    Looked around for a while and messed with settings and came across this. Thank you.


Information about Data protection