Repository navigation
[fix][build] Include the java.compiler module in the Pulsar image JVM - #27035
Merged
codelipenghui merged 1 commit intoOct 21, 2026
Merged
Conversation
Debezium connectors call javax.lang.model.SourceVersion, which lives in java.compiler. The jlink runtime in the Pulsar image left the module out, so Debezium sources fail on the 5.0.0 image with NoClassDefFoundError.
merlimat
approved these changes
Oct 21, 2026
codelipenghui
approved these changes
Oct 21, 2026
codelipenghui
left a comment
Contributor
There was a problem hiding this comment.
The targeted addition of java.compiler restores the API needed by Debezium while retaining the trimmed runtime without compiler tooling. No actionable findings identified within the reviewed scope.
Reviewed head: 43d932d. Source inspection only; no local image build or Debezium reproduction was run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #27034
Motivation
#26086 trimmed the JDK modules in the Pulsar image's
jlinkruntime, leaving out modules that a jdeps/bytecode scan showed Pulsar's shipped jars don't use, includingjava.compiler. Since PIP-465 (#25408), connectors are no longer shipped with Pulsar, so they weren't part of that scan, but users still deploy connector NARs on this image.Debezium's
io.debezium.config.Field.isClassNamecallsjavax.lang.model.SourceVersion.isName, which lives injava.compiler. As a result, Debezium sources fail on the 5.0.0 image:Reported in apache/pulsar-connectors#146 and diagnosed in discussion #27020.
Modifications
java.compilertoJDK_MODULESindocker/pulsar/Dockerfile.java.compileris API-only, depends only onjava.base, and adds about 250 KB. It doesn't pull injdk.compileror the ~10 MBlib/ct.symthat the trimming was mainly meant to drop; those stay excluded.Verifying this change
This change is a trivial rework without any test coverage. Verified locally:
jlinkruntime ofjava.base,java.logging: callingSourceVersion.isName(...)fails with the sameNoClassDefFoundError. Withjava.compileradded it succeeds, and the runtime contains onlyjava.base,java.compilerandjava.logging, with nolib/ct.sym(about 232 KB larger).SourceVersion.isNamecall is present indebezium-core-3.4.3.Final, the versionapache/pulsar-connectorscurrently builds against.Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
java.compilermodule.