玩!调用routes.Application.index时导致NoSuchFieldError的框架分段

时间:2013-07-01 06:07:10

标签: scala playframework-2.0

我们正在使用Play 2.1.0。当我们使用“play run”启动它时,它运行正常。但是当我们play stage; ./target/start -Dconfig.file=/Users/xxxx/Desktop/application.conf时,它会导致错误。以下是跟踪:

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

play.api.Application$$anon$1: Execution exception[[RuntimeException: java.lang.NoSuchFieldError: Application]]
    at play.api.Application$class.handleError(Application.scala:289) ~[play_2.10.jar:2.1.0]
    at play.api.DefaultApplication.handleError(Application.scala:383) [play_2.10.jar:2.1.0]
    at play.core.server.netty.PlayDefaultUpstreamHandler$$anon$2$$anonfun$handle$1.apply(PlayDefaultUpstreamHandler.scala:132) [play_2.10.jar:2.1.0]
    at play.core.server.netty.PlayDefaultUpstreamHandler$$anon$2$$anonfun$handle$1.apply(PlayDefaultUpstreamHandler.scala:128) [play_2.10.jar:2.1.0]
    at play.api.libs.concurrent.PlayPromise$$anonfun$extend1$1.apply(Promise.scala:113) [play_2.10.jar:2.1.0]
    at play.api.libs.concurrent.PlayPromise$$anonfun$extend1$1.apply(Promise.scala:113) [play_2.10.jar:2.1.0]
java.lang.RuntimeException: java.lang.NoSuchFieldError: Application
    at play.libs.F$Promise$6.apply(F.java:401) ~[play_2.10.jar:2.1.0]
    at scala.concurrent.Future$$anonfun$map$1.liftedTree2$1(Future.scala:253) ~[scala-library.jar:na]
    at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:249) ~[scala-library.jar:na]
    at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:249) ~[scala-library.jar:na]
    at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:29) ~[scala-library.jar:na]
    at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.liftedTree1$1(BatchingExecutor.scala:67) ~[akka-actor_2.10.jar:na]
Caused by: java.lang.NoSuchFieldError: Application
    at views.html.navbar$.apply(navbar.template.scala:40) ~[endovl_2.10-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
    at views.html.navbar$.render(navbar.template.scala:65) ~[endovl_2.10-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
    at views.html.main$.mainNavbar$1(main.template.scala:35) ~[endovl_2.10-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
    at views.html.main$.apply(main.template.scala:43) ~[endovl_2.10-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
    at views.html.index$.apply(index.template.scala:33) ~[endovl_2.10-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
    at views.html.index$.render(index.template.scala:64) ~[endovl_2.10-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
^C[info] application - XXXXXX - Application shutdown...

需要帮助......

下面是在view.html.navbar中导致NoSuchFieldError异常的行。

@navItem(routes.Application.index(), "Home")

这是navbar.template.scala

中的代码行
"""),_display_(Seq[Any](/*11.8*/navItem(routes.Application.index(), "Home"))),format.raw/*11.51*/("""

0 个答案:

没有答案