If trying to apply CDS training run via spring-boot buildpack latest version, via pack (providing source code), it's possible the buildpack mixes up JDK and JRE during training run (using the JDK during the training run instead of the JRE that will be used for runtime)
Expected Behavior
the JRE should always be used for the training run (as long as the user did not specify BP_JVM_TYPE=jdk) and thus the CDS run should work fine
Current Behavior
Sometimes the JDK is used instead of the JRE
Possible Solution
find a way to conssitenly get the JRE at traing run
If trying to apply CDS training run via
spring-boot
buildpack latest version, viapack
(providing source code), it's possible the buildpack mixes up JDK and JRE during training run (using the JDK during the training run instead of the JRE that will be used for runtime)Expected Behavior
the JRE should always be used for the training run (as long as the user did not specify
BP_JVM_TYPE=jdk
) and thus the CDS run should work fineCurrent Behavior
Sometimes the JDK is used instead of the JRE
Possible Solution
find a way to conssitenly get the JRE at traing run
Steps to Reproduce
https://github.com/anthonydahanne/petclinic-efficient-container/blob/buildpacks/.github/workflows/tests.yml#L34C1-L46C70 or more simply:
if during
You see:
CDS failed to apply because of a JVM mixup
Motivations
CDS should always work