我将我的播放框架从2.2.x升级到2.3.x.Everything在我的本地工作正常。但是,当我将其部署到服务器时,我收到以下错误。
java.lang.NoSuchFieldError: Assets
at securesocial.core.services.RoutesService$Default.valueFor(RoutesService.scala:73)
at securesocial.core.services.RoutesService$Default.<init>(RoutesService.scala:80)
at securesocial.core.RuntimeEnvironment$Default.routes$lzycompute(RuntimeEnvironment.scala:47)
at securesocial.core.RuntimeEnvironment$Default.routes(RuntimeEnvironment.scala:47)
at securesocial.core.SecureSocial$$anonfun$notAuthenticatedResult$1.applyOrElse(SecureSocial.scala:52)
at securesocial.core.SecureSocial$$anonfun$notAuthenticatedResult$1.applyOrElse(SecureSocial.scala:50)
at play.api.mvc.Rendering$render$.play$api$mvc$Rendering$render$$_render$1(Render.scala:35)
at play.api.mvc.Rendering$render$.apply(Render.scala:41)
at securesocial.core.SecureSocial$class.notAuthenticatedResult(SecureSocial.scala:50)
at controllers.UserHandler.notAuthenticatedResult(UserHandler.scala:22)
at securesocial.core.SecureSocial$SecuredActionBuilder$$anonfun$invokeSecuredBlock$1.apply(SecureSocial.scala:128)
at securesocial.core.SecureSocial$SecuredActionBuilder$$anonfun$invokeSecuredBlock$1.apply(SecureSocial.scala:110)
at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:251)
at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:249)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
at scala.concurrent.impl.ExecutionContextImpl$AdaptedForkJoinTask.exec(ExecutionContextImpl.scala:121)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.pollAndExecAll(ForkJoinPool.java:1253)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1346)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
UserHandler
class UserHandler(override implicit val env: RuntimeEnvironment[DemoUser]) extends securesocial.core.SecureSocial[DemoUser]{
答案 0 :(得分:0)
如果您的应用程序在代理或Web服务器(Apache或Ngninx)后面运行,请务必让Play对resolve / assets / **路由负责。
例如,如果您有Nginx服务器,请检查以下行(或等效的)是否被注释:
location ~ ^/(assets)/ {
root /path/to/site;
gzip_static on;
expires max;
add_header Cache-Control public;
# access_log /dev/null;
}