Closed melloware closed 1 year ago
Does it fail when depending on the quarkus-awt
extension too?
I have not tried the quarkus_awt
plugin should I include that alongside LibrePDF?
Worth a shot, I wonder if that solves the problem you're seeing
Will try it and report back.
Hmm with Quarkus AWT I now get this error instead...
com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported type sun.awt.X11.XBaseWindow is reachable
Version info: 'GraalVM 22.3.1.0-Final Java 17 Mandrel Distribution'
Java version info: '17.0.6+10'
C compiler: gcc (redhat, x86_64, 8.5.0)
Garbage collector: Serial GC
10 user-specific feature(s)
- io.quarkiverse.poi.runtime.graal.POIFeature: Quarkus runtime initialization for Apache POI
- io.quarkus.awt.runtime.graal.AwtFeature
- io.quarkus.awt.runtime.graal.DarwinAwtFeature
- io.quarkus.caffeine.runtime.graal.CacheConstructorsFeature
- io.quarkus.hibernate.validator.runtime.DisableLoggingFeature: Disables INFO logging during the analysis phase for the [org.hibernate.validator.internal.util.Version] categories
- io.quarkus.runner.Feature: Auto-generated class by Quarkus from the existing extensions
- io.quarkus.runtime.graal.DisableLoggingFeature: Disables INFO logging during the analysis phase for the [org.jboss.threads] categories
- io.quarkus.runtime.graal.ResourcesFeature: Register each line in META-INF/quarkus-native-resources.txt as a resource on Substrate VM
- io.quarkus.websockets.client.runtime.DisableLoggingFeature: Disables INFO logging during the analysis phase for the [io.undertow.websockets] categories
- org.eclipse.angus.activation.nativeimage.AngusActivationFeature
The bundle named: ALL-UNNAMED:javax.faces.Messages_pt_PR, has not been found. If the bundle is part of a module, verify the bundle name is a fully qualified class name. Otherwise verify the bundle path is accessible in the classpath.
17:11:57,730 INFO [org.omn.ApplicationInitializer] Using OmniFaces version 3.14.1
17:11:58,369 INFO [org.apa.myf.web.MyFacesContainerInitializer] Using org.apache.myfaces.webapp.MyFacesContainerInitializer
17:12:06,471 INFO [org.apa.myf.uti.ExternalSpecifications] MyFaces Core Bean Validation support enabled
17:12:06,630 INFO [org.apa.myf.uti.ExternalSpecifications] MyFaces Core CDI support enabled
17:12:06,631 INFO [org.apa.myf.uti.ExternalSpecifications] MyFaces Core EL 3.0 support enabled
17:12:06,632 INFO [org.apa.myf.uti.ExternalSpecifications] MyFaces Core Servlet 4.0 support enabled
17:12:06,679 INFO [org.pri.web.PostConstructApplicationEventListener] Running on PrimeFaces 12.0.0
17:12:06,680 INFO [org.pri.ext.app.PostConstructApplicationEventListener] Running on PrimeFaces Extensions 12.0.3
17:12:07,229 INFO [org.apa.myf.web.StartupServletContextListener] MyFaces Core has started, it took [8857] ms.
17:12:07,316 INFO [org.jbo.res.res.i18n] RESTEASY002225: Deploying javax.ws.rs.core.Application: class org.primefaces.showcase.rest.ShowCaseServices
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
[2/7] Performing analysis... [*] (174.1s @ 2.47GB)
28,382 (90.73%) of 31,281 classes reachable
37,992 (63.29%) of 60,024 fields reachable
120,888 (36.21%) of 333,827 methods reachable
5,647 classes, 4,319 fields, and 24,647 methods registered for reflection
3 native libraries: freetype, m, stdc++
Fatal error: com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing sun.awt.X11.XToolkit.createCanvas(java.awt.Canvas)
Parsing context:
at sun.awt.X11.XToolkit.createCanvas(XToolkit.java:1063)
at java.awt.Canvas.addNotify(Canvas.java:109)
at java.awt.Container.addImpl(Container.java:1150)
at java.awt.Container.add(Container.java:440)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java:35)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at com.sun.activation.viewers.ImageViewer.<init>(ImageViewer.java)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.AnalysisError.parsingError(AnalysisError.java:153)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.createFlowsGraph(MethodTypeFlow.java:104)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureFlowsGraphCreated(MethodTypeFlow.java:83)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.getOrCreateMethodFlowsGraph(MethodTypeFlow.java:65)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.typestate.DefaultVirtualInvokeTypeFlow.onObservedUpdate(DefaultVirtualInvokeTypeFlow.java:109)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:562)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.PointsToAnalysis$1.run(PointsToAnalysis.java:488)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:193)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:177)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported type sun.awt.X11.XBaseWindow is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
at parsing sun.awt.X11.XToolkit.createCanvas(XToolkit.java:1063)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.throwParserError(BytecodeParser.java:2518)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.throwParserError(SharedGraphBuilderPhase.java:110)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3393)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.handleBytecodeBlock(BytecodeParser.java:3345)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3190)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1138)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:1030)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:97)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.java:84)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:446)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.AnalysisParsedGraph.parseBytecode(AnalysisParsedGraph.java:135)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisMethod.ensureGraphParsed(AnalysisMethod.java:685)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:171)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:349)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.createFlowsGraph(MethodTypeFlow.java:93)
... 13 more
Caused by: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported type sun.awt.X11.XBaseWindow is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.lookup(AnnotationSubstitutionProcessor.java:140)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:125)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:125)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:210)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.lookup(AnalysisUniverse.java:190)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.<init>(AnalysisType.java:237)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.PointsToAnalysisType.<init>(PointsToAnalysisType.java:56)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.PointsToAnalysisFactory.createType(PointsToAnalysisFactory.java:45)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.createType(AnalysisUniverse.java:274)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:213)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.lookup(AnalysisUniverse.java:190)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.<init>(AnalysisType.java:237)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.PointsToAnalysisType.<init>(PointsToAnalysisType.java:56)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.PointsToAnalysisFactory.createType(PointsToAnalysisFactory.java:45)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.createType(AnalysisUniverse.java:274)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:213)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.lookup(AnalysisUniverse.java:190)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.<init>(AnalysisType.java:237)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.PointsToAnalysisType.<init>(PointsToAnalysisType.java:56)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.PointsToAnalysisFactory.createType(PointsToAnalysisFactory.java:45)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.createType(AnalysisUniverse.java:274)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:213)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.lookup(AnalysisUniverse.java:190)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.<init>(AnalysisType.java:237)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.PointsToAnalysisType.<init>(PointsToAnalysisType.java:56)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.PointsToAnalysisFactory.createType(PointsToAnalysisFactory.java:45)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.createType(AnalysisUniverse.java:274)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:213)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.infrastructure.WrappedConstantPool.lookupType(WrappedConstantPool.java:244)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupType(BytecodeParser.java:4199)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genNewInstance(BytecodeParser.java:4493)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5291)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3385)
Do you have a small reproducer project I could try?
Yep you can just try my GitHub project: https://github.com/melloware/quarkus-faces
run mvn clean package -Dnative
@melloware it sounds like some AWT classes are missing from initialization. Can you open an issue in (or move this issue to) the Quarkus issue tracker?
sure thing!
Created here: https://github.com/quarkusio/quarkus/issues/31224
Closing this issue.
I am trying to use LibrePDF in a GraalVM image and I wonder if anyone has done this successfully?
I keep running into this issue which looks like Apache FOP
undefined reference to Java_sun_font_SunLayoutEngine_disposeFace
https://github.com/graalvm/mandrel/issues/411
I was wondering if anyone else had stumbled upon this and has a Quarkus GraalVM solution?