Could you please share this project with us?
I will take a look an try to figure out what is happening.
Best,
Just removed my entire ivy cache and let everything pull in again, still the same issues.--
On Friday, 24 April 2015 08:33:44 UTC+2, Nicolaas Frederick Huysamen wrote:With the release of RC1 this morning, I thought I would give it a spin, but I cannot get Ebean to work. As per the migration guide, from a newly created play-java project with:
activator new myproject play-java
- build.sbt
- bump scalaVersion to 2.11.6
- remove javaEbean from libraryDependencies
- add mysql-connector-java as dependency
- added injected router config
- project/build.properties
- bump sbt version to 0.13.8
- project/plugins.sbt
- bumped sbt-plugin version to 2.4.0-RC1
- added sbt-play-ebean version 2.4.0-RC1
- controllers/Application.java
- removed static modifier from index()
At this point, the application still works fine. However, starting with the database stuff:
- conf/application.conf
- add all the database connection details
- uncomment default ebean server line to read models.*
- models/User.java
- create a simple User model class
At this point, there are no implementations of the Model class available. I would have thought the ebean plugin would pull in the required ajave-ebeanorm dependencies, but for some reason it does not (maybe this is just my machine...).So, including the ajave-ebeanorm dependency in build.sbt solves this issue. Starting the application is no problem, until I try to persist an entity, at which point:
Caused by: java.lang.NullPointerException: nullat com.avaje.ebean.Model.save(Model.java:122) ~[avaje-ebeanorm-4.2.0.jar:na]at models.User.create(User.java:54) ~[na:na]at Global.onStart(Global.java:12) ~[na:na]at play.core.j.JavaGlobalSettingsAdapter.onStart(JavaGlobalSettingsAdapter.scala:22) ~[play_2.11-2.4.0-RC1.jar:2.4.0-RC1]at play.api.GlobalPlugin.onStart(GlobalSettings.scala:272) ~[play_2.11-2.4.0-RC1.jar:2.4.0-RC1]at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91) ~[play_2.11-2.4.0-RC1.jar:2.4.0-RC1]at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91) ~[play_2.11-2.4.0-RC1.jar:2.4.0-RC1]at scala.collection.Iterator$class.foreach(Iterator.scala:750) ~[scala-library-2.11.6.jar:na]at scala.collection.AbstractIterator.foreach(Iterator.scala:1202) ~[scala-library-2.11.6.jar:na]at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) ~[scala-library-2.11.6.jar:na]Am I doing something obviously wrong here?
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "1.0.0-RC1")