java.lang.NoSuchMethodError正在追逐Cloudbees

时间:2013-12-11 13:28:59

标签: java playframework cloudbees ebean playframework-2.2

我的Play 2.2.1应用程序在我的家用机器上运行良好。

在推送到Cloudbees后,它已成功编译和部署。

但是在运行时,当我访问应用程序的URL时,我有时会得到502 Bad Gateway。然后我可以做 bees app:restart ,问题可能会消失或无法解决。然后我做 bees app:restart ,它可能会再次出现。

我完全没有看到它背后的逻辑。重启后50%出现。

以下是来自日志的堆栈跟踪:

Play server process ID is 782
[[37minfo[0m] play - database [default] connected at jdbc:mysql://ec2-23-21-211-172.compute-1.amazonaws.com:3306/totointer
Exception in thread "main" java.lang.NoSuchMethodError: com.avaje.ebean.config.AutofetchConfig.isGarbageCollectionOnShutdown()Z
    at com.avaje.ebeaninternal.server.autofetch.DefaultAutoFetchManager.setOwner(DefaultAutoFetchManager.java:98)
    at com.avaje.ebeaninternal.server.autofetch.AutoFetchManagerFactory.createAutoFetchManager(AutoFetchManagerFactory.java:29)
    at com.avaje.ebeaninternal.server.autofetch.AutoFetchManagerFactory.create(AutoFetchManagerFactory.java:23)
    at com.avaje.ebeaninternal.server.core.InternalConfiguration.createAutoFetchManager(InternalConfiguration.java:154)
    at com.avaje.ebeaninternal.server.core.DefaultServer.<init>(DefaultServer.java:237)
    at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:207)
    at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:65)
    at com.avaje.ebean.EbeanServerFactory.create(EbeanServerFactory.java:59)
    at play.db.ebean.EbeanPlugin.onStart(EbeanPlugin.java:79)
    at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
    at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
    at scala.collection.immutable.List.foreach(List.scala:318)
    at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:88)
    at play.api.Play$$anonfun$start$1.apply(Play.scala:88)
    at play.api.Play$$anonfun$start$1.apply(Play.scala:88)
    at play.utils.Threads$.withContextClassLoader(Threads.scala:18)
    at play.api.Play$.start(Play.scala:87)
    at play.core.StaticApplication.<init>(ApplicationProvider.scala:52)
    at play.core.server.NettyServer$.createServer(NettyServer.scala:243)
    at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:279)
    at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:274)
    at scala.Option.map(Option.scala:145)
    at play.core.server.NettyServer$.main(NettyServer.scala:274)
    at play.core.server.NettyServer.main(NettyServer.scala)

任何想法为什么?

1 个答案:

答案 0 :(得分:1)

看起来像classpath中相同jar的冲突版本,其中一个具有AutofetchConfig类但没有isGarbageCollectionOnShutdown方法。我注意到API doc上的示例,该方法在2.6.0中不存在,但存在于3.2.2