TL;DROn GraalVM native image with Spring Boot 4 + native-build-tools (native-maven-plugin) 1.x, getting Spring Pulsar's admin / topic auto-creation ( Environment
ContextA CDC bridge (Pulsar consumer → ClickHouse) built as a native image. We declare The chain of problems we hit
Questions
Thanks for any pointers! |
Replies: 2 comments
|
Resolved — turned out to be a misdiagnosis on our side, not a Spring Pulsar issue. Posting the resolution in case it helps others. Staying on the shaded (with We had switched to the non-shaded Recommendation for Spring Boot 4 native users: keep the shaded |
|
Correction / root cause found. My earlier answer was wrong — the native-build-tools plugin version does matter, and the cause is the GraalVM Reachability Metadata Repository ( Setup: Spring Boot 4.0.6, GraalVM CE 25, Pulsar via the default shaded Symptom on Linux native runtime (works on the JVM, and the same binary only WARNs on macOS): Evidence (via
So native-build-tools 1.0 (new Fix (both now verified on a Linux dev cluster):
We went with Option A to stay on the latest plugin. The trade-off is giving up the GraalVM Reachability Metadata Repository, which is acceptable for us since the app already ships explicit hint registrars; projects that lean on the repo for third-party metadata should weigh that before disabling it. Question for maintainers: is this expected with the 1.0 metadata repo + shaded Why this class specifically, and why only on Linux — grounded in the GraalVM compatibility guide:
|
Correction / root cause found. My earlier answer was wrong — the native-build-tools plugin version does matter, and the cause is the GraalVM Reachability Metadata Repository (
<metadataRepository>), not the shaded-vs-non-shaded choice.Setup: Spring Boot 4.0.6, GraalVM CE 25, Pulsar via the default shaded
pulsar-client-all,--initialize-at-run-time=...,org.apache.pulsar.shade.io.netty.Symptom on Linux native runtime (works on the JVM, and the same binary only WARNs on macOS):
Evidence (via
m…