3

I am getting below error while deploying the Spring Boot & SOAP project on Pivotal Cloud Foundry(PCF). I am using Spring Boot v2.2.2.RELEASE.?

Staging app and tracing logs...
   Downloading java_buildpack_offline...
   Downloaded java_buildpack_offline
   Cell f56fc3fb-e622-43a8-96cf-9be14d95c348 creating container for instance f847285e-0bb1-4015-b01c-4b0d84f992bf
   Cell f56fc3fb-e622-43a8-96cf-9be14d95c348 successfully created container for instance f847285e-0bb1-4015-b01c-4b0d84f992bf
   Downloading app package...
   Downloaded app package (473.1K)
   [1m[31m----->[0m[22m [1m[34mJava Buildpack[0m[22m [34mv4.26[0m [34m(offline)[0m | https://github.com/cloudfoundry/java-buildpack.git#e06e00b
   [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 stopping instance
   Cell destroying container for instance 
   Cell successfully destroyed container for instance 
Error staging application: App staging failed in the buildpack compile phase
PAA
  • 1
  • 46
  • 174
  • 282

2 Answers2

6

Resolved this by adding a repackage goal to the spring boot maven plugin in the maven build section:

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>2.2.4.RELEASE</version>
            <executions>
                <execution>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
awgtek
  • 1,483
  • 16
  • 28
2

I faced the same issue issue and it was because of missing path property in manifest.yml.

applications:

name: my-app

path: target/application-0.0.1-SNAPSHOT.jar
Dharman
  • 30,962
  • 25
  • 85
  • 135
Sanjay Jain
  • 3,518
  • 8
  • 59
  • 93