dilipdhankecha2530 opened a new issue, #3945: URL: https://github.com/apache/camel-quarkus/issues/3945
### Describe the bug With `camel-quarkus-pdf`, i am able to generate image from the pdf file. My reference code is [here](https://github.com/dilipdhankecha2530/quarkus-pdf-to-image). I am able to run the code but while creating the native image it will come up with below error message. ``` 22.1-java11: Pulling from quarkus/ubi-quarkus-native-image Digest: sha256:04464863cd626543e58f3058e168985b3be0597f55fa3de29c4a48191e89fe1b Status: Image is up to date for quay.io/quarkus/ubi-quarkus-native-image:22.1-java11 quay.io/quarkus/ubi-quarkus-native-image:22.1-java11 ======================================================================================================================== GraalVM Native Image: Generating 'code-with-quarkus-1.0.0-SNAPSHOT-runner' (executable)... ======================================================================================================================== [1/7] Initializing... (16.4s @ 0.30GB) Version info: 'GraalVM 22.1.0 Java 11 CE' C compiler: gcc (redhat, x86_64, 8.5.0) Garbage collector: Serial GC 4 user-provided feature(s) - io.quarkus.awt.runtime.graal.AwtFeature - io.quarkus.runner.AutoFeature - io.quarkus.runtime.graal.DisableLoggingAutoFeature - io.quarkus.runtime.graal.ResourcesFeature 12:03:06,572 WARN [org.apa.pdf.pdm.fon.FileSystemFontProvider] New fonts found, font cache will be re-built 12:03:06,577 WARN [org.apa.pdf.pdm.fon.FileSystemFontProvider] Building on-disk font cache, this may take a while 12:03:06,706 WARN [org.apa.pdf.pdm.fon.FileSystemFontProvider] Finished building on-disk font cache, found 9 fonts [2/7] Performing analysis... [*] (51.3s @ 4.23GB) 10,478 (81.87%) of 12,798 classes reachable 15,560 (68.03%) of 22,872 fields reachable 57,342 (59.63%) of 96,162 methods reachable 543 classes, 23 fields, and 3,608 methods registered for reflection Error: java.util.concurrent.ExecutionException: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of java.awt.image.ColorConvertOp are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use --trace-object-instantiation=java.awt.image.ColorConvertOp. com.oracle.graal.pointsto.util.AnalysisError: java.util.concurrent.ExecutionException: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of java.awt.image.ColorConvertOp are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use --trace-object-instantiation=java.awt.image.ColorConvertOp. at com.oracle.graal.pointsto.util.AnalysisError.shouldNotReachHere(AnalysisError.java:172) at com.oracle.graal.pointsto.util.AnalysisFuture.ensureDone(AnalysisFuture.java:66) at com.oracle.graal.pointsto.heap.ImageHeapScanner.lambda$postTask$9(ImageHeapScanner.java:611) at com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:193) at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:177) at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) Caused by: java.util.concurrent.ExecutionException: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of java.awt.image.ColorConvertOp are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use --trace-object-instantiation=java.awt.image.ColorConvertOp. at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) at com.oracle.graal.pointsto.util.AnalysisFuture.ensureDone(AnalysisFuture.java:64) ... 9 more Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of java.awt.image.ColorConvertOp are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use --trace-object-instantiation=java.awt.image.ColorConvertOp. at com.oracle.svm.hosted.classinitialization.ClassInitializationFeature.checkImageHeapInstance(ClassInitializationFeature.java:135) at com.oracle.graal.pointsto.meta.AnalysisUniverse.replaceObject(AnalysisUniverse.java:582) at com.oracle.svm.hosted.ameta.AnalysisConstantReflectionProvider.replaceObject(AnalysisConstantReflectionProvider.java:257) ------------------------------------------------------------------------------------------------------------------------ at com.oracle.svm.hosted.ameta.AnalysisConstantReflectionProvider.interceptValue(AnalysisConstantReflectionProvider.java:228) at com.oracle.svm.hosted.heap.SVMImageHeapScanner.transformFieldValue(SVMImageHeapScanner.java:126) at com.oracle.graal.pointsto.heap.ImageHeapScanner.onFieldValueReachable(ImageHeapScanner.java:331) at com.oracle.graal.pointsto.heap.ImageHeapScanner.lambda$createImageHeapObject$3(ImageHeapScanner.java:272) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at com.oracle.graal.pointsto.util.AnalysisFuture.ensureDone(AnalysisFuture.java:63) ... 9 more 2.7s (3.8% of total time) in 21 GCs | Peak RSS: 4.96GB | CPU load: 6.43 ======================================================================================================================== Failed generating 'code-with-quarkus-1.0.0-SNAPSHOT-runner' after 1m 8s. Error: Image build request failed with exit status 1 > Task :quarkusBuild FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':quarkusBuild'. > io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: io.quarkus.deployment.pkg.steps.NativeImageBuildStep$ImageGenerationFailureException: Image generation failed. Exit code: 1 at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.imageGenerationFailed(NativeImageBuildStep.java:400) at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:240) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:944) at io.quarkus.builder.BuildContext.run(BuildContext.java:277) at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18) at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478) at java.base/java.lang.Thread.run(Thread.java:833) at org.jboss.threads.JBossThread.run(JBossThread.java:501) * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 1m 17s 6 actionable tasks: 1 executed, 5 up-to-date ``` Is there any configuration i missed? ### Expected behavior Build must be successful and binary file works fine with lambda function or Rest API. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
