I was bashing my head to the wall (almost literally) trying to figure out why I was having this NullPointException problem for the past 17 days (now you believe, don't you ?).
So, reading and reading through Play's Documentation I have noticed something ( that I don't know how I haven't noticed before! ).
Configuring Ebean Play comes with the Ebean ORM. To enable it, add the Play Ebean plugin to your SBT plugins in project/plugins.sbt:
addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "3.0.0")
Also, reading some posts at Play's forum, I have noticed that version 2.5.6
was released, and I was using version 2.5.4
, in any case I upgrade it both and it worked, it solved my NullPointerException
problem.
However, I have created a new project via Play's template:
activator new
Fetching the latest list of templates...
Browse the list of templates: http://lightbend.com/activator/templates
Choose from these featured templates or enter a template name:
1) minimal-akka-java-seed
2) minimal-akka-scala-seed
3) minimal-java
4) minimal-scala
5) play-java
6) play-scala
(hit tab to see a list of all templates)
> 5
Enter a name for your application (just press enter for 'play-java')
> a-new-project
OK, application "a-new-project" is being created using the "play-java" template.
To run "a-new-project" from the command line, "cd a-new-project" then:
/tmp/000/a-new-project/activator run
To run the test for "a-new-project" from the command line, "cd a-new-project" then:
/tmp/000/a-new-project/activator test
To run the Activator UI for "a-new-project" from the command line, "cd a-new-project" then:
/tmp/000/a-new-project/activator ui
Then checking project/plugins.sbt
file:
// Play Ebean support, to enable, uncomment this line, and enable in your build.sbt using
// enablePlugins(PlayEbean).
// addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "1.0.0")
Which leads to my question: if you're starting a new project, via play's project template, why would you start with the oldest version of a plugin ? It would be better to start with the latest version of these plugins ?
You can see my changes on my repository here.