Quick revision
The short answer
I would decide with a survey: which libraries our services actually use and how many of them have native support in the GraalVM Reachability Metadata Repository or their own documentation. Support would then mean concrete things: maintained hints for our internal libraries, native builds and tests in the CI templates, and an approved list of libraries known to work. I would offer native only for service types where it pays off and the dependencies are proven, give a named team ownership of keeping metadata current through upgrades, and re-evaluate regularly as the ecosystem and JVM alternatives such as AOT caching improve.
What to remember
In this answer, we decided whether native images are supported by surveying the libraries our services use against the Reachability Metadata Repository and library documentation. We defined support as maintained hints for internal libraries, native builds and tests in CI templates and an approved library list, offered native only for service types where it pays off, assigned owners for keeping metadata current through upgrades, and committed to re-evaluating as the ecosystem and JVM options such as the AOT cache evolve.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
I would decide with a survey: which libraries our services actually use and how many of them have native support in the GraalVM Reachability Metadata Repository or their own documentation. Support would then mean concrete things: maintained hints for our internal libraries, native builds and tests in the CI templates, and an approved list of libraries known to work. I would offer native only for service types where it pays off and the dependencies are proven, give a named team ownership of keeping metadata current through upgrades, and re-evaluate regularly as the ecosystem and JVM alternatives such as AOT caching improve.
Why this question is asked
When several teams try a technology and give up, the platform has two bad options: ban it, or keep letting teams burn weeks on it. An architect's job is to find the third option, a clear statement of when it is supported and what the platform guarantees. Interviewers ask this question to see whether we can make that decision with evidence and turn the word support into concrete commitments with owners. In this answer, we will understand why the teams failed, survey our dependency landscape, define what support means, decide where native is offered, assign ownership and set up a regular re-evaluation.
1Why Teams Gave Up
A GraalVM native image includes only what its static analysis can reach, and it needs metadata for reflection, dynamic proxies, resources and serialization. Spring Boot generates most of that for Spring's own features, and many popular libraries have metadata in the shared GraalVM Reachability Metadata Repository. But a service that depends on a third-party library without metadata, or an older version of one, hits ClassNotFoundException or missing-proxy errors at run time, often only on a particular code path. Each team then debugs it with the tracing agent, hand-writes hints, and repeats the work after every upgrade. Teams gave up not because native images do not work, but because the cost landed on each team separately and unpredictably.
2Surveying the Libraries We Actually Use
The decision starts with data. From the dependency trees of all services (a Maven or Gradle dependency report, or the software bill of materials many pipelines already produce) we list every third-party library and version, counted by how many services use it. For the top libraries, which typically cover most services, we check native support: an entry in the Reachability Metadata Repository for that version, metadata shipped in the library jar, or explicit support in the library's or Spring's documentation. We also try a native build of a few typical services to confirm what the paperwork says.
The result is a coverage figure, such as 85 percent of services use only supported libraries except for two internal ones and one old XML library, and a short list of the libraries that block the rest. That list tells us what work makes native viable and for whom.
| Library | Services using it | Native status | Action |
|---|---|---|---|
| Spring Boot starters | 120 | supported by Spring | none |
| PostgreSQL JDBC driver | 95 | metadata available | none |
| acme-audit (internal) | 80 | no hints | add hints, we own it |
| legacy XML binding 2.x | 14 | no metadata | replace or exclude |
| Vendor SDK X | 6 | unknown | spike, ask vendor |
3Defining What Support Means
Support has to be a set of promises a team can rely on, not a slogan. In our platform it would mean three things. First, maintained hints for every internal library, shipped in the library jar (a RuntimeHintsRegistrar registered through aot.factories, or GraalVM metadata under META-INF/native-image), tested natively in each library's own CI. Second, CI templates in the golden path that run the native build and native tests (nativeCompile and nativeTest) on suitably sized runners, so a team switches native on with one setting rather than building a pipeline. Third, an approved library list: libraries and versions known to work natively, with a note on any hints needed. Using a library off the list is allowed, but the team takes on the risk knowingly.
We also say what support does not mean: the platform will not debug every third-party library for every team, and native is not guaranteed for any service type outside the supported ones.
4Offering Native Only Where It Pays Off
Native images give millisecond startup and low memory at the cost of long builds, metadata maintenance and often lower peak throughput. So we offer them for service types where startup and memory dominate: functions and scale-to-zero services, command-line tools and short jobs, small services that scale out often. Long-running, high-throughput services stay on the JVM, where the JIT's peak performance and the simpler build win, and can use cheaper startup improvements such as class data sharing or the JDK AOT cache. A service is eligible when it is of a supported type and all its dependencies are on the approved list.
- Service type benefits from fast start or low memory?YesCheck dependenciesNoUse JVM, consider CDS or AOT cache
- All libraries on the approved list?YesUse golden path native templateNoReplace library or request a spike
- Native tests pass in CI?YesSupported native serviceNoPlatform helps fix hints, then retry
3 steps in order. Play them, or step through them one at a time.
5Assigning Ownership for Metadata
Metadata goes stale every time a library is upgraded, which is exactly when teams got burned before. So ownership must be explicit. Each internal library's owning team owns its hints and native tests. A small platform group owns the approved list: when a new version of a listed library is released, its native status is checked as part of the upgrade, using the native test suite of a reference service, before the version is approved. That group also contributes missing metadata upstream to the Reachability Metadata Repository or to the library itself, so the fix benefits the ecosystem and stops being our private burden.
6Re-evaluating as the Ecosystem Changes
This decision should not be permanent. Library support for native images improves every year, Spring's own inference grows, and the JDK is adding alternatives: the AOT cache from Project Leyden (JDK 24 and later) gives much faster startup while keeping full JVM behaviour and no closed-world restrictions. Once or twice a year we repeat the survey, review the costs native services actually had, and compare with what the JVM options now offer. The outcome might be to widen native support, or to narrow it because the JVM caught up for most of our needs.
7Follow-up questions
Why not simply ban native images after the failures?
Because some workloads gain a lot from them, such as functions or CLI tools where startup is most of the run time. A ban would push those teams to worse workarounds. A narrow, well-defined support scope captures the value while keeping the cost predictable.
What does the approved list look like in practice?
A short page or file in the platform repository listing library, supported versions, native status and any required hints or notes, checked automatically by a build step that warns when a native-enabled service uses an unlisted library.
Who pays for the extra CI capacity?
The platform budget covers the shared native runners, because one pool serves all eligible services more cheaply than each team buying its own, and the usage is visible per team so it can be reviewed.
8Conclusion
In this answer, we decided whether native images are supported by surveying the libraries our services use against the Reachability Metadata Repository and library documentation. We defined support as maintained hints for internal libraries, native builds and tests in CI templates and an approved library list, offered native only for service types where it pays off, assigned owners for keeping metadata current through upgrades, and committed to re-evaluating as the ecosystem and JVM options such as the AOT cache evolve.
Open with
Teams gave up because each of them separately ran into libraries without native metadata and had no shared help. So I'd start with a survey: list all third-party and internal libraries across services with how many services use each, and check native support for the versions we use, through the GraalVM Reachability Metadata Repository, metadata in the jars and library docs, plus a few trial builds.
Then, if they want more
That gives a coverage number and a short list of blocking libraries. Then I'd define what support means concretely. Our internal libraries ship maintained hints in their jars, through aot.factories or META-INF/native-image, with native tests in their own CI. The golden path CI templates include native builds and nativeTest on suitably sized runners.
And we keep an approved library list with known-good versions. I'd offer native only for service types where it pays off, like functions, scale-to-zero services, CLI tools and small services that scale out often, and only when all their dependencies are on the list. Long-running high-throughput services stay on the JVM and can use CDS or the AOT cache.
Ownership is explicit: library teams own their hints, a small platform group owns the approved list and checks new versions before approving them, and contributes missing metadata upstream. And I'd re-evaluate yearly, because both native support and JDK alternatives like the AOT cache keep improving.
About this answer
- Last updated
- 12 November 2026
- Versions it names
- Java 24
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Kubernetes documentation, Spring Boot reference
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Several teams tried native images and gave up because of missing reflection metadata in...": https://scrivio-interview-library.netlify.app/spring-boot/native-and-aot/d7a15c5b30/