gudzpoz commented on issue #2695:
URL: https://github.com/apache/fory/issues/2695#issuecomment-3695307346
@chaokunyang I just tested and, no, it does not resolve this issue.
**The first case**
The first `AbstractObject[]` case still throws the same exception, **whether
or not it uses native images**.
**The second case**
Native image building fails with an error:
```
Error: Feature defined by org.apache.fory.graalvm.feature.ForyGraalVMFeature
unexpectedly failed with a(n) java.lang.IllegalArgumentException. Please report
this problem to the authors of
org.apache.fory.graalvm.feature.ForyGraalVMFeature.
Caused by: java.lang.IllegalArgumentException: Class
java.util.ImmutableCollections$MapN cannot be instantiated reflectively . It
does not have a nullary constructor.
at
org.graalvm.nativeimage/org.graalvm.nativeimage.hosted.RuntimeReflection.registerForReflectiveInstantiation(RuntimeReflection.java:312)
at
org.apache.fory.graalvm.feature.ForyGraalVMFeature.registerForReflectiveInstantiation(ForyGraalVMFeature.java:110)
at
org.apache.fory.graalvm.feature.ForyGraalVMFeature.registerClass(ForyGraalVMFeature.java:89)
at
org.apache.fory.graalvm.feature.ForyGraalVMFeature.duringAnalysis(ForyGraalVMFeature.java:64)
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$2(NativeImageGenerator.java:844)
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:93)
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$1(NativeImageGenerator.java:844)
at
org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.AbstractAnalysisEngine.runAnalysis(AbstractAnalysisEngine.java:179)
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:841)
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:569)
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:534)
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:548)
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:761)
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:163)
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:111)
```
From the documentation page you linked, it seems this `GraalVmFeature` only
addresses private constructors and records. And it does not seem quite relevant
to this issue?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]