-
So I've got a relatively simple (I think) application that I'm trying to natively compile. It's using Jackson to parse some HTTP responses into records, and Graal is having some issues with this. Code sample:
Build output:
Prior to that, I ran the application (exercising this code path) with the following:
Any suggestions on what's going on here? Is this a bug with the agent not recording enough detail for Records? Converting them to Classes instead of Records fixes things - annoying, but not a big deal right now. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 7 replies
-
That seems to be a bug in the heap scanning for analysis, it misses scanning the |
Beta Was this translation helpful? Give feedback.
-
Coming over from AsamK/signal-cli#1016. Does the answer by @ipsi mean the methods should be called this way or they can be added to the reflect config? Sorry, no java knowledge here, just trying to maintain packages 🙈 😁 |
Beta Was this translation helpful? Give feedback.
-
I ran into the same problem with records and can't change the code (The code uses Jackson too in a Micronaut environment). Any ideas (GraalVM 22.2.0 Java 17 CE)? |
Beta Was this translation helpful? Give feedback.
-
I faced the same issue and fixed it! com.example.GraalVMRuntimeReflectionRegistrationFeature.java:
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
That seems to be a bug in the heap scanning for analysis, it misses scanning the
methodAccessor
/constructorAccessor
for a method/constructor. Then, the later scan from roots that builds the native image heap doesn't find the necessary metadata when reading this field. I don't think it is an agent bug, if the agent missed it would fail at run time with a different error. Can you share a complete reproducible?