cloudfoundry / java-buildpack

Cloud Foundry buildpack for running Java applications
Apache License 2.0
439 stars 2.58k forks source link

Java-Buildpack #1036

Open cah-sandesh-gadhave opened 1 year ago

cah-sandesh-gadhave commented 1 year ago

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..

pivotal-david-osullivan commented 1 year ago

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?

debargharoy commented 11 months ago

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.