0

我正在将 Grails 应用程序从 CouldFoundry 移动到 AppFog 并且遇到错误 310: Staging failed, web.xml not found。af push成功,但是当我尝试使用env-add设置环境变量或启动应用程序时,出现暂存错误。

有一个先前的回应这个问题here。我尝试按照该响应中的描述安装最新的 cloud-foundry 插件,并且 cf-push 成功地将应用程序推送到 AppFog,但我仍然收到 310 错误。

Error 310: Staging failed: 'Staging task failed:
 Staging plugin failed: /opt/cloudfoundry/vcap/staging/lib/vcap/staging/plugin/java_web/plugin.rb:28:in `block in stage_application': Web application staging failed: web.xml not found (RuntimeError)  
from /opt/cloudfoundry/vcap/staging/lib/vcap/staging/plugin/java_web/plugin.rb:22:in `chdir'
from /opt/cloudfoundry/vcap/staging/lib/vcap/staging/plugin/java_web/plugin.rb:22:in `stage_application'
from /opt/cloudfoundry/vcap/stager/bin/run_plugin:19:in `<main>'
4

2 回答 2

0

正如 Graeme 在这篇文章中所描述的那样,我无意中将 Tomcat 包含在我的 WAR 文件中。当我更正 Tomcat 引用时,暂存错误已解决(它不再寻找与 Tomcat 关联的 web.xml 文件)。

于 2013-07-20T18:56:19.813 回答
0

我遇到了同样的问题并通过将war文件重命名为与我在appfog上创建的应用程序相同的名称并在目标目录中运行“af update”来解决它。出于某种原因,我一直在运行“af update”,但我相信这可能是问题所在。无论如何,我不确定哪个更改有效,但在执行这些步骤后,我能够让我的应用程序运行。

$ grails war target/rw.war
| Packaging Grails application
| Compiling 2 source files..
| Done creating WAR target/rw.war
$ cd target/
$ af update rw
于 2013-07-27T06:48:22.573 回答