I am learning this course of springboot by Dan Vega, https://www.youtube.com/watch?v=UgX5lgv4uVM. I am getting an error I can't seem to get arround.
When I try to mvn spring-boot:build-image in maven to create an Image for Docker I am geting this error "Builder lifecycle 'creator' failed with status code 51"
[INFO]
[INFO] --- spring-boot-maven-plugin:3.0.1:build-image (default-cli) @ content-calendar ---
[INFO] Building image 'docker.io/library/content-calendar:0.0.1-SNAPSHOT'
[INFO]
[INFO] > Pulling builder image 'docker.io/paketobuildpacks/builder:base' 100%
[INFO] > Pulled builder image 'paketobuildpacks/builder@sha256:dd98964477407e67eb6620450c4f4a5d2236f8fdc8e6569ce3778318aa4b7e64'
[INFO] > Pulling run image 'docker.io/paketobuildpacks/run:base-cnb' 100%
[INFO] > Pulled run image 'paketobuildpacks/run@sha256:41443690a2dc36118112db2c4790dc2bc8189926dae9ff91992b78675d0cac39'
[INFO] > Executing lifecycle version v0.16.1
[INFO] > Using build cache volume 'pack-cache-b6484801b9ac.build'
[INFO]
[INFO] > Running creator
[INFO] [creator] ===> ANALYZING
[INFO] [creator] Image with name "docker.io/library/content-calendar:0.0.1-SNAPSHOT" not found
[INFO] [creator] ===> DETECTING
[INFO] [creator] 6 of 26 buildpacks participating
[INFO] [creator] paketo-buildpacks/ca-certificates 3.6.1
[INFO] [creator] paketo-buildpacks/bellsoft-liberica 10.1.0
[INFO] [creator] paketo-buildpacks/syft 1.28.0
[INFO] [creator] paketo-buildpacks/executable-jar 6.6.3
[INFO] [creator] paketo-buildpacks/dist-zip 5.5.2
[INFO] [creator] paketo-buildpacks/spring-boot 5.23.0
[INFO] [creator] ===> RESTORING
[INFO] [creator] ===> BUILDING
[INFO] [creator]
[INFO] [creator] Paketo Buildpack for CA Certificates 3.6.1
[INFO] [creator] https://github.com/paketo-buildpacks/ca-certificates
[INFO] [creator] Launch Helper: Contributing to layer
[INFO] [creator] Creating /layers/paketo-buildpacks_ca-certificates/helper/exec.d/ca-certificates-helper
[INFO] [creator]
[INFO] [creator] Paketo Buildpack for BellSoft Liberica 10.1.0
[INFO] [creator] https://github.com/paketo-buildpacks/bellsoft-liberica
[INFO] [creator] Build Configuration:
[INFO] [creator] $BP_JVM_JLINK_ARGS --no-man-pages --no-header-files --strip-debug --compress=1 configure custom link arguments (--output must be omitted)
[INFO] [creator] $BP_JVM_JLINK_ENABLED false enables running jlink tool to generate custom JRE
[INFO] [creator] $BP_JVM_TYPE JRE the JVM type - JDK or JRE
[INFO] [creator] $BP_JVM_VERSION 17 the Java version
[INFO] [creator] Launch Configuration:
[INFO] [creator] $BPL_DEBUG_ENABLED false enables Java remote debugging support
[INFO] [creator] $BPL_DEBUG_PORT 8000 configure the remote debugging port
[INFO] [creator] $BPL_DEBUG_SUSPEND false configure whether to suspend execution until a debugger has attached
[INFO] [creator] $BPL_HEAP_DUMP_PATH write heap dumps on error to this path
[INFO] [creator] $BPL_JAVA_NMT_ENABLED true enables Java Native Memory Tracking (NMT)
[INFO] [creator] $BPL_JAVA_NMT_LEVEL summary configure level of NMT, summary or detail
[INFO] [creator] $BPL_JFR_ARGS configure custom Java Flight Recording (JFR) arguments
[INFO] [creator] $BPL_JFR_ENABLED false enables Java Flight Recording (JFR)
[INFO] [creator] $BPL_JMX_ENABLED false enables Java Management Extensions (JMX)
[INFO] [creator] $BPL_JMX_PORT 5000 configure the JMX port
[INFO] [creator] $BPL_JVM_HEAD_ROOM 0 the headroom in memory calculation
[INFO] [creator] $BPL_JVM_LOADED_CLASS_COUNT 35% of classes the number of loaded classes in memory calculation
[INFO] [creator] $BPL_JVM_THREAD_COUNT 250 the number of threads in memory calculation
[INFO] [creator] $JAVA_TOOL_OPTIONS the JVM launch flags
[INFO] [creator] Using Java version 18 extracted from MANIFEST.MF
[INFO] [creator] No valid JRE available, providing matching JDK instead. Using a JDK at runtime has security implications.
[INFO] [creator] : Contributing to layer
[INFO] [creator] unable to invoke layer creator
[INFO] [creator] unable to get dependency
[INFO] [creator] unable to download
[INFO] [creator] unable to request
[INFO] [creator] Get "": unsupported protocol scheme ""
[INFO] [creator] Warning: Dependency has no SHA256. Skipping cache.
[INFO] [creator] Downloading from
[INFO] [creator] ERROR: failed to build: exit status 1
I am passing all the steps of maven build image process before actually building image enter image description here
[INFO] [creator] Image with name "docker.io/library/content-calendar:0.0.1-SNAPSHOT" not found is the line where the issue is. I am fairly new to all SpringBoot, Maven and Docker. And I am using the exact code provide by Dan in the video crash course from https://github.com/danvega/content-calendar (which is working with the instructor).
To sucessfully build an Image from mvn spring-boot:build-image for the Docker
You error here is about
Using Java version 18 extracted from MANIFEST.MF
No valid JRE available
which is to be expected, since Paketo Buildpack for BellSoft Liberica 10.1.0
does not provide JDK or JRE version 18 (it just supports LTS JVM releases + the latest, which is 20
as of now; so no 18
)
Version 18
was detected from the MANIFEST.MF
of the jar you're trying to build an OCI image from; which itself was set from the JVM you used to build your application.
I suggest you either use a JDK version 17
or 20
on your machine; a convenient way to switch between JDKs is using SDKMAN!
Hope that helps!