cf push failed due to java runtime version error

67 Views Asked by At

I'm trying to create a maven java project with spring boot and deploy it to SAP BTP.

the generated project from spring boot version is 3.2.1 and i have checked the java version is 17 as shown below.

enter image description here

The issue : when i run cf push get the following error of java runtime mismatch version. it seems like it still using a java version 11 but i'm not sure from where

enter image description here

the solution i have tried:

  • adding JBP_CONFIG_OPEN_JDK_JRE: '{jre: { version: 17.+ }}' to env in manifest.yml file but not working too enter image description here
1

There are 1 best solutions below

0
Suneeth Pillai On

if you are using SAPMachineJDK , pls set the env variables as below

env:

JBP_CONFIG_COMPONENTS: '{ "jres": ["com.sap.xs.java.buildpack.jdk.SAPMachineJDK"] }' JBP_CONFIG_SAP_MACHINE_JDK: '{ "version": "17.+" }'

This is documented here -https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-developer-guide-for-cloud-foundry-multitarget-applications-sap-web-ide-full-stack/change-application-settings-for-cloud-foundry-java-run-time