简体   繁体   English

Scala-Heroku-Play !:无法解析符号ReverseApplication

[英]Scala - Heroku - Play!: cannot resolve symbol ReverseApplication

I'm trying to deploy a Play application written in Scala on Heroku following this documentation . 我正在尝试根据本文档Heroku上部署用Scala编写的Play应用程序。 On my local machine everything works fine, the server starts correctly and there's no error at compile time, when deploying on Heroku I get this errors: 在我的本地计算机上,一切正常,服务器正常启动,在编译时没有错误,在Heroku部署时出现以下错误:

[error] /tmp/scala_buildpack_build_dir/target/scala-2.10/src_managed/main/com/my/project/application/action/routes.java:8: cannot find symbol [错误] /tmp/scala_buildpack_build_dir/target/scala-2.10/src_managed/main/com/my/project/application/action/routes.java:8:找不到符号

[error] symbol : class ReverseApplication [错误]符号:类ReverseApplication

[error] location: package com.my.project.application.action [错误]位置:包com.my.project.application.action

[error] public static final com.my.project.application.action.ReverseApplication Application = new com.my.project.application.action.ReverseApplication(); [错误]公共静态最终com.my.project.application.action.ReverseApplication Application =新的com.my.project.application.action.ReverseApplication();

And other very similar regarding a ref package (which I don't have in my project) like this one: 关于ref包(我在我的项目中没有)的其他非常类似的例子:

package com.my.project.application.action.ref does not exist 包com.my.project.application.action.ref不存在

Then I went looking for what was generated by the sbt clean compile stage command and I found this ( routes.class ): 然后,我去寻找sbt clean compile stage命令生成的sbt clean compile stage ,发现了这个( routes.class ):

package com.my.project.application.job;

public class routes {

  public static final com.my.project.application.job.ReverseApplication Application = new com.my.project.application.job.ReverseApplication();

  public static class javascript {
    public static final com.my.project.application.job.javascript.ReverseApplication Application = new com.my.project.application.job.javascript.ReverseApplication();
  }

  public static class ref {
    public static final com.my.project.application.job.ref.ReverseApplication Application = new com.my.project.application.job.ref.ReverseApplication();
  }
}

Where javascript.ReverseApplication and ref.ReverseApplication cannot be found, there's another generated file called routes_reverseRouting.scala which has this missing packages but it's not imported in the routes.class when compiling and staging. javascript.ReverseApplicationref.ReverseApplication无法找到,还有另一个名为生成的文件routes_reverseRouting.scala具有这种丢失的包,但它不是在进口routes.class编译和升级的时候。 Am I missing something? 我想念什么吗? Last time I deployed (a week ago or so) I didn't had this problems. 上次部署(大约一周前)时,我没有遇到此问题。

I'm using scala v2.10.3 and sbt v13.0 . 我正在使用scala v2.10.3sbt v13.0

原来, Heroku不清理编译,如果你不使用显式配置它heroku config:set SBT_CLEAN=true所描述这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM