java-buildpack icon indicating copy to clipboard operation
java-buildpack copied to clipboard

Java-Buildpack

Open cah-sandesh-gadhave opened this issue 2 years ago • 2 comments

Hi,

We are migrating application on spring boot 3.1.1 and Java 17. But when we push the code on environment we are getting below error.

Java Buildpack v4.60.0 (offline) | https://github.com/cloudfoundry/java-buildpack#9f8aba60 [Buildpack] ERROR Finalize failed with exception #<RuntimeError: No container can run this application........ Failed to compile droplet: Failed to run finalize script: exit status 1 Exit status 223

But in the stack we have Java Buildpack v4.60.0 version. Is this java buildpack(v4.60.0 ) version supported to spring boot 3.1.1 and java 17?

Could you please help me on this... We are not able to deploy..

cah-sandesh-gadhave avatar Oct 05 '23 13:10 cah-sandesh-gadhave

The buildpack should not care which version of Boot you are using, and Java 17 should work fine as long as you are enabling this version with the variable JBP_CONFIG_OPEN_JDK_JRE '{ jre: { version: 17.+ }}'.

This error indicates the buildpack does not recognise the type of application you are pushing. Can you share more details including the following so we can assist further?

  • Full cf push command
  • Full push log
  • If you are no providing a -p flag, details of the contents of the directory where you run the push
  • Can the application be run locally, e.g. with java -jar?

pivotal-david-osullivan avatar Oct 09 '23 13:10 pivotal-david-osullivan

I have encountered the same issue with valid application. In my case, I was creating the offline buildpack locally on a Windows machine. By default, files created on a Windows system don't execute attribute set. And the build process probably doesn't take that into account for Windows.

The same error goes away with the same app if the buildpack is rebuilt in a Linux machine.

debargharoy avatar Jan 02 '24 17:01 debargharoy