0

此应用程序是从 Play 2.0.4 迁移而来的。到 2.1-RC1。当推送到 heroku 时,我从 heroku 日志中得到了这个错误。我应该为 Play 2.1 使用不同的构建包吗?

2012-12-11T03:04:36+00:00 heroku[web.1]: Starting process with command `target/start -Dhttp.port=${PORT} -Dconfig.resource=prod.conf ${JAVA_OPTS}`
2012-12-11T03:04:38+00:00 app[web.1]: Exception in thread "main" java.lang.NoSuchMethodError: scala.Predef$.augmentString(Ljava/lang/String;)Lscala/collection/immutable/StringOps;
2012-12-11T03:04:38+00:00 app[web.1]:   at play.core.server.NettyServer$.createServer(NettyServer.scala:111)
2012-12-11T03:04:38+00:00 app[web.1]:   at play.core.server.NettyServer$$anonfun$main$5.apply(NettyServer.scala:153)
2012-12-11T03:04:38+00:00 app[web.1]:   at play.core.server.NettyServer$$anonfun$main$5.apply(NettyServer.scala:152)
2012-12-11T03:04:38+00:00 app[web.1]:   at scala.Option.map(Option.scala:145)
2012-12-11T03:04:38+00:00 app[web.1]:   at play.core.server.NettyServer$.main(NettyServer.scala:152)
2012-12-11T03:04:38+00:00 app[web.1]:   at play.core.server.NettyServer.main(NettyServer.scala)

这是我的 Build.scala。

val appDependencies = Seq(
      javaCore, javaJdbc, javaEbean,
      "org.webjars" % "bootstrap" % "2.1.1",
      "postgresql" % "postgresql" % "9.1-901-1.jdbc4",
      "rome" % "rome" % "1.0",
      "com.typesafe" %% "play-plugins-mailer" % "2.1-SNAPSHOT",

      "commons-codec" % "commons-codec" % "1.6",
      "commons-io" % "commons-io" % "2.3",
      "com.typesafe" % "play-plugins-inject" % "2.0.2",
      "com.typesafe" %% "play-plugins-mailer" % "2.1-SNAPSHOT",
      "com.typesafe.akka" % "akka-testkit" % "2.0.2",
      "org.imgscalr" % "imgscalr-lib" % "4.2",
      "org.codehaus.jackson" % "jackson-jaxrs" % "1.9.5",
      "org.codehaus.jackson" % "jackson-xc" % "1.9.5",
      "org.codehaus.jackson" % "jackson-mapper-asl" % "1.9.5",
      "org.codehaus.jackson" % "jackson-core-asl" % "1.9.5",
      "org.mindrot" % "jbcrypt" % "0.3m"

    )

val main = play.Project(appName, appVersion, appDependencies).settings(
      resolvers += "webjars" at "http://webjars.github.com/m2",
      resolvers += "Mave2" at "http://repo1.maven.org/maven2",
      resolvers += "jets3t" at "http://www.jets3t.org/maven2",
      resolvers += "Typesafe Releases Repository" at "http://repo.typesafe.com/typesafe/releases/",
      resolvers += "Typesafe Snapshots Repository" at "http://repo.typesafe.com/typesafe/snapshots/",
      resolvers += Resolver.url("Typesafe Ivy Snapshots", url("http://repo.typesafe.com/typesafe/ivy-snapshots/"))(Resolver.ivyStylePatterns),
      resolvers += "Daniel's Repository" at "http://danieldietrich.net/repository/snapshots/"
    )
4

1 回答 1

0

就我而言,我必须从 build.scala 中删除此依赖项

"com.typesafe" % "play-plugins-inject" % "2.0.2"

并从 play.plugins 中删除插件。

1500:com.typesafe.plugin.inject.ManualInjectionPlugin

这个插件引入了 play_2.9,它依赖于 ehcache 并导致 play 第二次初始化 play 的缓存,而来自 Play 2.1 的 play_2.10 已经初始化了它。

于 2013-02-13T09:26:13.767 回答