September 24, 2013

Play Framework 2.2 in IntelliJ, errors in controllers everywhere

8  comments

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!

Tags

IntelliJ, Java, Play Framework, Play Framework 2.2, Scala


You may also like

Blog url changed to https

I just changed the url of this blog to https://jensjaeger.com. TLS encryption is now the default for all request to this page. It might be possible that some image links on some articles are hard coded http. If you find such an error it would be nice if you leave me comment so i can

Read More

Format date and time in java with prettytime

Prettytime is a nice java library to format a java Date()s in a nice humanized ago format, like: moments ago 2 minutes ago 13 hours ago 7 months ago 2 years ago Prettytime is localized in over 30 languages. It’s super simple to use Add the dependency to your maven pom: org.ocpsoft.prettytime prettytime 3.2.7.Final or

Read More