Today when I tried to run the sample application hello-java which from [email protected]:SpringSource/cloudfoundry-samples.git, I got the following errors when start the application,
今天当我尝试从[email protected]运行示例应用程序hello-java时:SpringSource / cloudfoundry-samples.git,启动应用程序时出现以下错误,
Starting 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' 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 stage_application' from /var/vcap/packages/stager/bin/run_plugin:19:in
'
启动hello-java-from-linux-1 ... FAILED CFoundry :: AppStagingError:310:暂存失败:'暂存任务失败:暂存插件失败:/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:stage_application中的块':Web应用程序暂存失败:从/ var / vcap找不到web.xml(RuntimeError) /packages/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.64/lib/vcap/staging/plugin/java_web/plugin.rb:22:inchdir'from / var / vcap / packages / stager /vend/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:
I've checked the target war "hello-java-1.0.war" built by maven, the web.xml has been already packaged under WEB-INF.
我检查了由maven构建的目标战争“hello-java-1.0.war”,web.xml已经打包在WEB-INF下。
Here is the pom.xml of the sample application, https://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 provided
这是示例应用程序的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提供
And here are the vmc version and maven version info, - vmc 0.4.7, - Apache Maven 3.0.4
这里是vmc版本和maven版本信息, - vmc 0.4.7, - Apache Maven 3.0.4
Can anyone help on how to solve the issue? Thanks a lot!
任何人都可以帮助解决问题吗?非常感谢!
BTW, I've searched the cloudfoundry support site, and found some tips to check log files, however seems that I cannot get log files to check the real error, I ran into the following issues when tried to get the log files.
顺便说一句,我搜索了cloudfoundry支持网站,并找到了一些检查日志文件的技巧,但似乎我无法获取日志文件来检查真正的错误,我在尝试获取日志文件时遇到了以下问题。
[niy@niy-fedora hello-java]$ vmc files hello-java-from-linux-1 logs Getting file contents... FAILED CFoundry::AppStopped: 305: Operation not permitted on a stopped app For more information, see ~/.vmc/crash
[niy @ niy-fedora hello-java] $ vmc files hello-java-from-linux-1 logs获取文件内容... FAILED CFoundry :: AppStopped:305:停止的app上不允许操作有关更多信息,请参阅〜 /.vmc/crash
1 个解决方案
#1
3
When deploying a java or spring WAR with vmc it's important to be in the same directory as the WAR file at the time you execute vmc.
使用vmc部署java或spring WAR时,在执行vmc时与WAR文件位于同一目录中非常重要。