You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are building a Quarkus native image in Gitlab Pipeline using Gradle and "remote container build" with Docker.
Since we added https://quarkus.io/extensions/io.quarkiverse.poi/quarkus-poi/ extension and configured the Dockerfile according to Quarkus-POI guidelines (install and copy libraries), we faced java.awt.Font NoClassDefFoundError errors during generation of an Excel sheet.
ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-7) HTTP Request to /reports/api/v1/download?start=2023-01&end=2024-12&source=ALL failed, error id: 6dc1b7cd-0365-4e01-b08c-b18f861228d9-1: java.lang.NoClassDefFoundError: Could not initialize class java.awt.Font
Debugging has shown the *.so files generated next to the *-runner application files are not copied back to the build output directory from the remote container. Building it locally by using just "container build" works as expected and the runtime error did not appear with the required *.so files next to the *-runner application file.
Debugging the build process confirmed: only the *-runner file is copied back from the container.
Digging into the source we found there is no option to preserve the other produced build artifacts, just the executable will be copied back.
It would be great to have all build artifacts preserved for further steps in the build process.
For now we just copy the libs from a different location, but it would be great to just use them from remote container build.
$ java --version
openjdk 17.0.10 2024-01-16
OpenJDK Runtime Environment (build 17.0.10+7-alpine-r0)
OpenJDK 64-Bit Server VM (build 17.0.10+7-alpine-r0, mixed mode, sharing)
$ docker version
Client:
Version: 20.10.22
API version: 1.41
Go version: go1.18.9
Git commit: 3a2c30b
Built: Thu Dec 15 22:21:58 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.22
API version: 1.41 (minimum version 1.12)
Go version: go1.18.9
Git commit: 42c8b31
Built: Thu Dec 15 22:26:12 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.15
GitCommit: 5b842e528e99d4d4c1686467debf2bd4b88ecd86
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
It requires a similar fix to this one, i.e. to copy the libs. Note that it is paramount to those libs coming from the same build as the main executable.
We are building a Quarkus native image in Gitlab Pipeline using Gradle and "remote container build" with Docker.
Since we added https://quarkus.io/extensions/io.quarkiverse.poi/quarkus-poi/ extension and configured the Dockerfile according to Quarkus-POI guidelines (install and copy libraries), we faced java.awt.Font NoClassDefFoundError errors during generation of an Excel sheet.
Debugging has shown the *.so files generated next to the *-runner application files are not copied back to the build output directory from the remote container. Building it locally by using just "container build" works as expected and the runtime error did not appear with the required *.so files next to the *-runner application file.
Debugging the build process confirmed: only the *-runner file is copied back from the container.
Digging into the source we found there is no option to preserve the other produced build artifacts, just the executable will be copied back.
quarkus/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildRemoteContainerRunner.java
Line 57 in 20d3c9d
It would be great to have all build artifacts preserved for further steps in the build process.
For now we just copy the libs from a different location, but it would be great to just use them from remote container build.
Build command:
The text was updated successfully, but these errors were encountered: