今天,当我尝试运行来自 git@github.com:SpringSource/cloudfoundry-samples.git 的示例应用程序 hello-java 时,启动应用程序时出现以下错误,
开始 hello-java-from-linux-1... FAILED CFoundry::AppStagingError: 310: Staging failed: 'Staging task failed: Staging plugin failed: /var/vcap/packages/stager/vendor/bundle/ruby/1.9. 1/gems/vcap_staging-0.1.64/lib/vcap/staging/plugin/java_web/plugin.rb:28:in block in stage_application': Web application staging failed: web.xml not found (RuntimeError)
from /var/vcap/packages/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.64/lib/vcap/staging/plugin/java_web/plugin.rb:22:in
chdir' 来自 /var/vcap/packages/stager/vendor/bundle/ruby/1.9.1/gems /vcap_staging-0.1.64/lib/vcap/staging/plugin/java_web/plugin.rb:22:in stage_application'
from /var/vcap/packages/stager/bin/run_plugin:19:in
'
我检查了maven构建的目标war“hello-java-1.0.war”,web.xml已经打包在WEB-INF下。
这里是示例应用程序的 pom.xml,http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 org.cloudfoundry.samples hello-java 1.0 war javax.servlet servlet-api 2.5 提供
这里是 vmc 版本和 maven 版本信息,-vmc 0.4.7,-Apache Maven 3.0.4
任何人都可以帮助解决这个问题吗?非常感谢!
顺便说一句,我搜索了 cloudfoundry 支持站点,发现了一些检查日志文件的提示,但是似乎我无法获取日志文件来检查真正的错误,我在尝试获取日志文件时遇到了以下问题。
[niy@niy-fedora hello-java]$ vmc files hello-java-from-linux-1 logs 正在获取文件内容... FAILED CFoundry::AppStopped: 305: Operation not allowed on a stop app 有关更多信息,请参阅~ /.vmc/崩溃