First of all, this question may seem much alike: Play Framework: PersistenceException: The type is not a registered entity? (Ebean) but it's not...
I'm trying to save an entity but it doesn't even render the template, after I restart Play it just gives the error in the subject. Of course, the app compiles.
I've done all the steps to use EBean with Play:
@Entity (javax.persistence.Entity)play.db.ebean.Model)application.conf ebean.default="models.*" (my classes are in the models package)Any suggestions? Tests I can do? Things to check? To be fair, stackoverflow is my last resort...
Thanks in advance,
Complete stack trace:
play.api.Configuration$$anon$1: Configuration error [Cannot register class [models.Producer] in Ebean server]
at play.api.Configuration$.play$api$Configuration$$configError(Configuration.scala:71) ~[play_2.9.1.jar:2.0.2]
at play.api.Configuration.reportError(Configuration.scala:258) ~[play_2.9.1.jar:2.0.2]
at play.Configuration.reportError(Configuration.java:119) ~[play_2.9.1.jar:2.0.2]
at play.db.ebean.EbeanPlugin.onStart(EbeanPlugin.java:71) ~[play_2.9.1.jar:2.0.2]
at play.api.Play$$anonfun$start$1.apply(Play.scala:60) ~[play_2.9.1.jar:2.0.2]
at play.api.Play$$anonfun$start$1.apply(Play.scala:60) ~[play_2.9.1.jar:2.0.2]
Caused by: java.lang.ExceptionInInitializerError: null
at java.lang.Class.forName0(Native Method) ~[na:1.7.0_02]
at java.lang.Class.forName(Class.java:264) ~[na:1.7.0_02]
at play.db.ebean.EbeanPlugin.onStart(EbeanPlugin.java:69) ~[play_2.9.1.jar:2.0.2]
at play.api.Play$$anonfun$start$1.apply(Play.scala:60) ~[play_2.9.1.jar:2.0.2]
at play.api.Play$$anonfun$start$1.apply(Play.scala:60) ~[play_2.9.1.jar:2.0.2]
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59) ~[scala-library.jar:0.11.3]
Caused by: java.lang.RuntimeException: DataSource user is null?
at com.avaje.ebeaninternal.server.lib.sql.DataSourcePool.<init>(DataSourcePool.java:198) ~[ebean.jar:na]
at com.avaje.ebeaninternal.server.lib.sql.DataSourceManager.getDataSource(DataSourceManager.java:210) ~[ebean.jar:na]
at com.avaje.ebeaninternal.server.lib.sql.DataSourceGlobalManager.getDataSource(DataSourceGlobalManager.java:63) ~[ebean.jar:na]
at com.avaje.ebeaninternal.server.core.DefaultServerFactory.getDataSourceFromConfig(DefaultServerFactory.java:427) ~[ebean.jar:na]
at com.avaje.ebeaninternal.server.core.DefaultServerFactory.setDataSource(DefaultServerFactory.java:388) ~[ebean.jar:na]
at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:168) ~[ebean.jar:na]
I had exactly the same issue described in the first post. It is weird, in my case, just running
# play
> clean
> compile
> run
the app started to work again
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With