Open Karm opened 1 week ago
/cc @galderz (mandrel), @zakkak (mandrel,native-image)
Thanks @Karm a bunch of extensions would not be what they are without the AWT support! POI, OpenPDF, JasperReports, PrimeFaces, etc etc etc!
We see CI failures related to the AWT extension that look like:
2024-10-30 01:13:20,333 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-1) HTTP Request to /graphics?entrypoint=ImageReader failed, error id: 65b052b0-b3ec-4502-9843-fdd625349ddb-8: org.jboss.resteasy.spi.UnhandledException: java.lang.UnsupportedOperationException: Add AWT Quarkus extension to enable Java2D/ImageIO. Additional system libraries such as `freetype' and `fontconfig' might be needed.
at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:107)
at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:344)
at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:205)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:452)
at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invokePropagateNotFound$6(SynchronousDispatcher.java:275)
at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:154)
at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:321)
at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:157)
at org.jboss.resteasy.core.SynchronousDispatcher.invokePropagateNotFound(SynchronousDispatcher.java:260)
at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:86)
at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:151)
at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler$1.run(VertxRequestHandler.java:97)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:627)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2675)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2654)
at org.jboss.threads.EnhancedQueueExecutor.runThreadBody(EnhancedQueueExecutor.java:1627)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1594)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:11)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:11)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base@24-beta/java.lang.Thread.runWith(Thread.java:1589)
at java.base@24-beta/java.lang.Thread.run(Thread.java:1576)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:832)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:808)
Caused by: java.lang.UnsupportedOperationException: Add AWT Quarkus extension to enable Java2D/ImageIO. Additional system libraries such as `freetype' and `fontconfig' might be needed.
at java.desktop@24-beta/javax.imageio.spi.ServiceRegistry.getServiceProviders(ServiceRegistry.java:82)
at java.desktop@24-beta/javax.imageio.ImageIO.getImageReadersByFormatName(ImageIO.java:714)
at io.quarkus.awt.it.GraphicsResource.graphics(GraphicsResource.java:67)
at java.base@24-beta/java.lang.reflect.Method.invoke(Method.java:573)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:154)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:118)
at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:560)
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:452)
at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:413)
at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:321)
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:415)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:378)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:356)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:70)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:429)
... 20 more
See: https://github.com/graalvm/mandrel/actions/runs/11584744646/job/32253322009#step:12:1176
@jerboaa
Caused by: jakarta.enterprise.inject.CreationException: java.io.IOException: Problem reading font data.
That is what this https://github.com/quarkusio/quarkus/pull/44092 PR fixes.
Add AWT Quarkus extension to enable Java2D/ImageIO. Additional system libraries such as `freetype' and `fontconfig' might be needed.
Are expected messages for quarkus-integration-test-no-awt
test, note the no prefix.
@jerboaa You began to see this thanks to https://github.com/quarkusio/quarkus/issues/43997 being fixed and tests running again...
Describe the bug
AWT extension needs adjusting for the latest JDK 24 ea.
Expected behavior
AWT integration tests pass.
Actual behavior
AWT integration tests fail.
Why hasn't it been caught already?
https://github.com/quarkusio/quarkus/issues/43997
How to Reproduce?
~The problem is likely in the part where we cope with the fact that JDK code expects JAVA_HOME to be there to look up font files while native-image neither needs nor has any JAVA_HOME.~
Output of
uname -a
orver
Linux mandrel2 5.14.0-407.el9.aarch64 #1 SMP PREEMPT_DYNAMIC Thu Jan 11 00:18:37 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
Output of
java -version
OpenJDK Runtime Environment Temurin-17.0.13+11 (build 17.0.13+11) \n OpenJDK Runtime Environment Mandrel-24.2.0-devc6e7912f0d0 (build 24-beta+19-ea)
Quarkus version or git rev
main
Build tool (ie. output of
mvnw --version
orgradlew --version
)mvnw
Additional information
No response