quarkiverse / quarkus-primefaces

Quarkus PrimeFaces Faces (JSF) Extension
https://github.com/primefaces/primefaces
Apache License 2.0
32 stars 3 forks source link

Native: Rome XmlReader #32

Closed gesker closed 1 year ago

gesker commented 1 year ago

The guide over at quarkus indicates Rome is not supported.

Is it best to add the rome dependency OR is there an option so that rome does not come into play when compiling natively?

My application doesn't actually use this but it does block native compile.

Could this be added to quarkus-primefaces as a dependency to allow native compilation like qrcodegen -- or perhaps a quarkus friendly equivalent like the already included quarkus-poi?

This error is thrown when trying to compile native:

Fatal error: java.lang.NoClassDefFoundError: com/rometools/rome/io/XmlReader
        at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
        at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3402)
        at java.base/java.lang.Class.getDeclaredMethods(Class.java:2504)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleDeletedClass(AnnotationSubstitutionProcessor.java:607)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleClass(AnnotationSubstitutionProcessor.java:382)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.init(AnnotationSubstitutionProcessor.java:342)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.createAnnotationSubstitutionProcessor(NativeImageGenerator.java:966)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:868)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:575)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:535)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:403)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:580)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:128)
Caused by: java.lang.ClassNotFoundException: com.rometools.rome.io.XmlReader
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
melloware commented 1 year ago

No that won't help because Rome uses JDOM which is not Native Mode enabled.

FeedReader not supported. Rome library uses JDOM XML parsing and we did not spend the time to investigate for a lightly used component.

melloware commented 1 year ago

Something is different with your setup as ROME is ignored fine in my setup?

melloware commented 1 year ago

See this I already remove Rome from all PrimeFaces classes in Native mode: https://github.com/quarkiverse/quarkus-primefaces/blob/main/quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/graal/DeleteFeedInput.java

melloware commented 1 year ago

@gesker You aren't still seeing this issue are you? I remove all traces of Rome at runtime with an @Delete ?

gesker commented 1 year ago

Kindly close. Thanks @melloware

melloware commented 1 month ago

@gesker in 15.0.0 of PF we are swithing to a more modern RSS reader and that will allow me to make this Native Mode.