Reputation: 59
I am trying to push a service to PCF using cf push
command. I am getting the following error:
-----> Java Buildpack v4.16.1 (offline) | https://github.com/cloudfoundry/java-buildpack.git#41b8ff8
[Buildpack] ERROR Finalize failed with exception #<RuntimeError: No container can run this application. Please ensure that you've pushed a valid JVM artifact or artifacts using the -p command line argument or path manifest entry. Information about valid JVM artifacts can be found at https://github.com/cloudfoundry/java-buildpack#additional-documentation. >
No container can run this application. Please ensure that you've pushed a valid JVM artifact or artifacts using the -p command line argument or path manifest entry. Information about valid JVM artifacts can be found at https://github.com/cloudfoundry/java-buildpack#additional-documentation.
Failed to compile droplet: Failed to run finalize script: exit status 1
Exit status 223
Cell 73976a3c-ee0d-4c45-8067-55f73fc1b90a stopping instance 13e76fc9-87be-40be-a3b7-0f0cb1efc55f
Cell 73976a3c-ee0d-4c45-8067-55f73fc1b90a destroying container for instance 13e76fc9-87be-40be-a3b7-0f0cb1efc55f
Cell 73976a3c-ee0d-4c45-8067-55f73fc1b90a successfully destroyed container for instance 13e76fc9-87be-40be-a3b7-0f0cb1efc55f
Error staging application: App staging failed in the buildpack compile phase
FAILED
I have the following contents in my yml file:
applications:
- name: Someapplication
buildpack: java_buildpack_offline
memory: 1G
path: target/someapp-SNAPSHOT.jar
instances: 1
env:
SPRING_PROFILES_ACTIVE: env1
Upvotes: 0
Views: 7531
Reputation: 59
The jar was not generating properly. I added this plugin and was able to resolve the issue.
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
Upvotes: 1