在为Maven依赖项生成Ebean DDL时播放NoSuchMethodError

时间:2013-11-21 22:38:36

标签: maven playframework-2.0 ebean

我有一个简单的Play(2.2.1)应用程序,其中包含一个带注释实体的(本地)Maven依赖项。我正在使用Ebean,它识别实体并且可以正常使用

evolutionplugin =禁止

在application.conf中

。但是当我启用evolutions时,我得到一个NoSuchMethodError。有任何想法吗?感谢。

[error] application - 

! @6gbh417nl - Internal server error, for (GET) [/] ->

play.api.UnexpectedException: Unexpected exception[NoSuchMethodError: com.avaje.ebeaninternal.server.ddl.DdlGenerator: method <init>()V not found]
        at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:152) ~[play_2.10.jar:2.2.1]
        at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:112) ~[play_2.10.jar:2.2.1]
        at scala.Option.map(Option.scala:145) ~[scala-library.jar:na]
        at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:112) ~[play_2.10.jar:2.2.1]
        at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:110) ~[play_2.10.jar:2.2.1]
        at scala.util.Success.flatMap(Try.scala:200) ~[scala-library.jar:na]
Caused by: java.lang.NoSuchMethodError: com.avaje.ebeaninternal.server.ddl.DdlGenerator: method <init>()V not found
        at play.db.ebean.EbeanPlugin.generateEvolutionScript(EbeanPlugin.java:105) ~[play-java-ebean_2.10.jar:2.2.1]
        at play.db.ebean.EbeanPlugin.onStart(EbeanPlugin.java:85) ~[play-java-ebean_2.10.jar:2.2.1]
        at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88) ~[play_2.10.jar:2.2.1]
        at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88) ~[play_2.10.jar:2.2.1]
        at scala.collection.immutable.List.foreach(List.scala:318) ~[scala-library.jar:na]
        at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:88) ~[play_2.10.jar:2.2.1]

1 个答案:

答案 0 :(得分:0)

我的依赖是使用旧版本的ebean而不是播放应用。升级修复了问题。