首先的登記類,這個問題看起來相像: Play Framework: PersistenceException: The type is not a registered entity? (Ebean),但它不是...遊戲框架:2.0.2的PersistenceException:不能在Ebean服務器
我試圖挽救實體,但它甚至沒有渲染模板,我重新啓動後,它只是給主題中的錯誤。 當然,應用程序編譯。
我已經做了所有使用EBean與播放的步驟:
- 與
@Entity
(javax.persistence.Entity)註釋模型 - 模型擴展模型(
play.db.ebean.Model
) - Ebean是啓用我
application.conf
ebean.default="models.*"
(我的類都在models
包)
有什麼建議?我可以做的測試?要檢查的東西? 爲了公平起見,計算器是我的最後一招......
由於提前,
完整的堆棧跟蹤:
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]
得到同樣的問題..:\這讓我瘋狂 –
對我而言,每次播放項目的目錄都會發生變化。不知何故,它在編譯代碼中硬編碼劇本運行的目錄。 –