Reputation: 37665
I am developing a project using the Play framework. Yesterday, 'something' happened and my Play.Configuration object is null after initialisation. I have tried retracing my steps but I am unable to locate the change that I have made that has resulted in the error!
Although Google is usually my friend, I have not been able to find much information on this problem. Does anyone know where I can / should start looking to try to resolve this?
Upvotes: 1
Views: 957
Reputation: 37665
Thanks to Morten Kjetland, who provided this answer on the play-framework google group, I have found the reason for the error was as follows:
It looks like you run the test directly in IntelliJ.
When you do it like this, Play it self is not running - nor is it initialized.
When running tests that use Play features like that you have to run them in play:
"play test" and goto http://localhost:9000/@tests
or "play auto-test"
-Morten
Embarrassingly I did know about @tests url, but I was a little naiive and thought that if I had the Play running then intelliJ would somehow magically find that instance of Play (not sure why I thought that) and conduct the tests accordingly.
Anyway - I hope my mistake will help someone else in the future - and thanks again to the helpful people on stack overflow and particularly the play-framework google group!
Upvotes: 4