Reputation: 21
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,
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
'
I've checked the target war "hello-java-1.0.war" built by maven, the web.xml has been already packaged under WEB-INF.
Here is the pom.xml of the sample application, 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 provided
And here are the vmc version and maven version info, - 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.
[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
Upvotes: 2
Views: 392
Reputation: 639
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.
Upvotes: 3