-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Describe the bug
I migrated Jakarta EE application to Quarkus.
git clone https://github.com/ybezsonov/cargotracker.git
cd cargotracker
git checkout quarkus
I can build application with
mvn clean package -P quarkus
I can also build and run application in the container on localhost:8080/cargo-tracker
docker compose up --build --force-recreate && docker rm $(docker ps -a | grep "cargotracker" | awk '{print $1}')
But when I try to use Quarkus dev tools I get error.
docker build -t cargotracker:latest -f Dockerfile.native --progress=plain .
It fails with
#16 173.9 Error: Class initialization of org.apache.commons.compress.compressors.deflate64.HuffmanDecoder failed. This error is reported at image build time because class org.apache.commons.compress.compressors.deflate64.HuffmanDecoder is registered for linking at image build time by command line and command line. Use the option
#16 173.9 '--initialize-at-run-time=org.apache.commons.compress.compressors.deflate64.HuffmanDecoder'
...
When I add --initialize-at-run-time=org.apache.commons.compress.compressors.deflate64.HuffmanDecoder I get another error
#16 177.8 Fatal error: com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing org.apache.commons.compress.compressors.deflate64.HuffmanDecoder.decode(HuffmanDecoder.java:511)
#16 177.8 Parsing context:
#16 177.8 at org.apache.commons.compress.compressors.deflate64.Deflate64CompressorInputStream.read(Deflate64CompressorInputStream.java:114)
#16 177.8 at org.primefaces.util.ResourceUtils.toByteArray(ResourceUtils.java:142)
#16 177.8 at org.primefaces.util.ResourceUtils.toBase64(ResourceUtils.java:102)
#16 177.8 at org.primefaces.util.DynamicContentSrcBuilder.build(DynamicContentSrcBuilder.java:72)
#16 177.8 at org.primefaces.component.graphicimage.GraphicImageRenderer.getImageSrc(GraphicImageRenderer.java:90)
#16 177.8 at org.primefaces.component.graphicimage.GraphicImageRenderer.encodeEnd(GraphicImageRenderer.java:52)
#16 177.8 at root method.(Unknown Source)
Could you please help to fix it?
Expected behavior
Native build works
Actual behavior
Native build stops with the error
How to Reproduce?
git clone https://github.com/ybezsonov/cargotracker.git
cd cargotracker
git checkout quarkus
docker build -t cargotracker:latest -f Dockerfile.native --progress=plain .
Output of uname -a or ver
Linux amzn2023.x86_64 x86_64 x86_64 x86_64 GNU/Linux
Output of java -version
openjdk version "21.0.6" 2025-01-21 LTS OpenJDK Runtime Environment Corretto-21.0.6.7.1 (build 21.0.6+7-LTS) OpenJDK 64-Bit Server VM Corretto-21.0.6.7.1 (build 21.0.6+7-LTS, mixed mode, sharing)
Mandrel or GraalVM version (if different from Java)
quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21
Quarkus version or git rev
3.18.4
Build tool (ie. output of mvnw --version or gradlew --version)
Maven home: /usr/lib/maven Java version: 21.0.6, vendor: Amazon.com Inc., runtime: /usr/lib/jvm/java-21-amazon-corretto.x86_64 Default locale: en, platform encoding: UTF-8 OS name: "linux", version: "6.1.127-135.201.amzn2023.x86_64", arch: "amd64", family: "unix"
Additional information
No response