我正在开发一个使用 Play2 和 Ebean 作为 ORM 的应用程序。由于以下错误,我无法启动我的应用程序:
[warn] c.a.e.s.c.DefaultServer - JMX beans for Ebean server [default] already registered. Will try unregister/registerEbean:server=default2,function=Logging
[warn] c.a.ebean.Ebean - Existing EbeanServer [default] is being replaced?
[error] application -
! @6f14elgpb - Internal server error, for (GET) [/] ->
play.api.UnexpectedException: Unexpected exception[NullPointerException: null]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:150) ~[play_2.10.jar:2.1.2]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:114) ~[play_2.10.jar:2.1.2]
at scala.Option.map(Option.scala:145) ~[scala-library.jar:na]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:114) ~[play_2.10.jar:2.1.2]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:112) ~[play_2.10.jar:2.1.2]
at scala.util.Either$RightProjection.flatMap(Either.scala:523) ~[scala-library.jar:na]
Caused by: java.lang.NullPointerException: null
at com.avaje.ebeaninternal.server.ddl.CreateTableVisitor.isDbColumnWritten(CreateTableVisitor.java:58) ~[avaje-ebeanorm-server.jar:na]
at com.avaje.ebeaninternal.server.ddl.CreateTableColumnVisitor.visitOneImported(CreateTableColumnVisitor.java:117) ~[avaje-ebeanorm-server.jar:na]
at com.avaje.ebeaninternal.server.ddl.VisitorUtil.visit(VisitorUtil.java:109) ~[avaje-ebeanorm-server.jar:na]
at com.avaje.ebeaninternal.server.ddl.VisitorUtil.visit(VisitorUtil.java:73) ~[avaje-ebeanorm-server.jar:na]
at com.avaje.ebeaninternal.server.ddl.VisitorUtil.visitBean(VisitorUtil.java:62) ~[avaje-ebeanorm-server.jar:na]
at com.avaje.ebeaninternal.server.ddl.VisitorUtil.visit(VisitorUtil.java:36) ~[avaje-ebeanorm-server.jar:na]
[trace] play - No handler, got direct result: SimpleResult(500, Map(Content-Type -> text/html; charset=utf-8))
我不明白发生了什么,服务器启动良好,我试图重新启动 mysql 但没有任何改变。这似乎是来自 Ebean DDL 生成器的错误,但我该如何调试它?
谢谢你的帮助。
编辑:如果我在 application.conf 中禁用进化插件
# Evolutions
# ~~~~~
# You can disable evolutions if needed
evolutionplugin=disabled
我的应用程序启动(但数据库未更新...)
编辑 2:我在应用程序级别激活了 TRACE 日志并更新了堆栈跟踪,以下几行呢:
[warn] c.a.e.s.c.DefaultServer - JMX beans for Ebean server [default] already registered. Will try unregister/registerEbean:server=default2,function=Logging
[warn] c.a.ebean.Ebean - Existing EbeanServer [default] is being replaced?