You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fory.apache.org by "dennishendriksen (via GitHub)" <gi...@apache.org> on 2025/09/23 07:43:43 UTC
[I] GraalVM native image: instantiated reflectively but was never registered [fory]
dennishendriksen opened a new issue, #2647:
URL: https://github.com/apache/fory/issues/2647
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/fory/issues) and found no similar issues.
### Version
Fory v0.12.2 with GraalVm v25.0.0
### Component(s)
Java
### Minimal reproduce step
1. Checkout https://github.com/molgenis/vip-annotate/tree/fix/annotate_fory_native_image2
2. Execute App.main in IDE to confirm that this works without issues
3. Run `mvn clean package`
4. Execute ./target/vip-annotate
### What did you expect to see?
Something like:
```
serialize/deserialize
toString():org.molgenis.vipannotate.SequenceVariantAnnotationIndex@264c5d07
success
```
### What did you see instead?
```
serialize/deserialize
Exception in thread "main" org.apache.fory.exception.DeserializationException: Failed to deserialize input
at org.apache.fory.util.ExceptionUtils.handleReadFailed(ExceptionUtils.java:66)
at org.apache.fory.Fory.deserializeJavaObject(Fory.java:1226)
at org.apache.fory.Fory.deserializeJavaObject(Fory.java:1197)
at org.molgenis.vipannotate.App.main(App.java:62)
at java.base@25/java.lang.invoke.LambdaForm$DMH/s4b9cede1.invokeStaticInit(LambdaForm$DMH)
Caused by: java.lang.IllegalArgumentException: Type org.molgenis.vipannotate.SequenceVariantAnnotationIndex is instantiated reflectively but was never registered. Register the type by adding "unsafeAllocated" for the type in reflect-config.json.
at org.graalvm.nativeimage.builder/com.oracle.svm.core.graal.snippets.SubstrateAllocationSnippets.slowPathHubOrUnsafeInstantiationError(SubstrateAllocationSnippets.java:388)
at org.molgenis.vipannotate.SequenceVariantAnnotationIndexForyCodec_0.read(SequenceVariantAnnotationIndexForyCodec_0.java:134)
at org.apache.fory.Fory.readDataInternal(Fory.java:1052)
at org.apache.fory.Fory.deserializeJavaObject(Fory.java:1220)
... 3 more
```
### Anything Else?
While isolating the issue I ran into the BigInteger[] issue mentioned in https://github.com/apache/fory/issues/2635, but I am not able to reproduce it unfortunately.
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
--
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: commits-unsubscribe@fory.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
Re: [I] GraalVM native image: instantiated reflectively but was never registered [fory]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang closed issue #2647: GraalVM native image: instantiated reflectively but was never registered
URL: https://github.com/apache/fory/issues/2647
--
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: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
Re: [I] GraalVM native image: instantiated reflectively but was never registered [fory]
Posted by "dennishendriksen (via GitHub)" <gi...@apache.org>.
dennishendriksen commented on issue #2647:
URL: https://github.com/apache/fory/issues/2647#issuecomment-3325065941
Issue can be reproduced on GraalVM 21 by updating `<maven.compiler.release>25</maven.compiler.release>` to `<maven.compiler.release>21</maven.compiler.release>`.
--
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: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
Re: [I] GraalVM native image: instantiated reflectively but was never registered [fory]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #2647:
URL: https://github.com/apache/fory/issues/2647#issuecomment-3326607303
@dennishendriksen It seems that graalvm 25 have some unexpected behaviour https://github.com/oracle/graal/issues/12220
--
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: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
Re: [I] GraalVM native image: instantiated reflectively but was never registered [fory]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #2647:
URL: https://github.com/apache/fory/issues/2647#issuecomment-3326609205
@dennishendriksen For current version of fory, you can refer to graalvm documents to configure `unsafeAllocated` in reflect-meta.json
--
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: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org