I've recently started to use Jongo with Play Framework 2.1 but I'm encountering a weird problem. I'm in the same situation as this guy :
Everything works fine in Play Framework 2.0.4 but in 2.1.0, it only works in prod mode.
A NoSuchFieldError appeared when I'm using the reversed route resolver in a template (ex: '@routes.Application.index()'). But the problem doesn't appear when I'm resolving assets (ex: '@routes.Assets.at('images/favicon.png'))
Except these 2 guys on stackoverflow, am I the only one in this case ?
ATM I'll continue to use Play 2.0.4 to continue my developments with Jongo and sorry if the problem doesn't come from Jongo, but I just want to be sure that you've heard of it.
In any case, thanks for Jongo and keep up the good work!
Thanks for the stackoverflow pointer.
Are you using a Jongo module ?
I'm using this plugin https://github.com/alexanderjarvis/play-jongo to include Jongo in my Play project.
Before this module was created, i had bootstrapped a Jongo plugin : https://github.com/bguerout/jongo-play2-spike
This is just a spike but may be you can check if it works with it.
Ok, I will test it this evening.
I've successfully used your repo jongo-play2-spike to create a Jongo module for Play 2.1 (with slight modifications, I'll do a pull-request), but unfortunately, I have the exact same error when using reverse routes (the NoSuchFieldError as in the stackoverflow thread.)
Edit: it seriously looks like this is not a Jongo-related problem, as everything works well in prod mode.
From what I've read about play 2.1, the classpath doesn't behave identically between the dev and prod mode. I'll try too look further about this and make you a report if something's useful for Jongo. Feel free to close the bug-report.
Okay problem fixed.
It seems like the Application controller in your module caused problem as there was exactly the same controller in my project, and the routes were conflicting in the routes definitions.
i've submitted a pull-request on the module to update it to Play 2.1.0 with the "problem" fixed :
I'll add configuration in your module project to be able to use in mine and send others pull-request to it.