Fix split Couchbase SDK by moving couchbase-client-bom above Boot's import - #497
Open
Linesmerrill wants to merge 1 commit into
Open
Fix split Couchbase SDK by moving couchbase-client-bom above Boot's import#497Linesmerrill wants to merge 1 commit into
Linesmerrill wants to merge 1 commit into
Conversation
…mport
synapse was resolving java-client 3.8.3 together with core-io 3.11.2 - a
mismatched pair from the same SDK.
Cause is the dependencyManagement first-declaration-wins rule. The
couchbase-client-bom import sat below the spring-boot-dependencies import.
Spring Boot manages com.couchbase.client:java-client via its
couchbase-client.version property (3.8.3 as of Boot 3.5.16) but does not
manage core-io, so Boot won for java-client while couchbase-client-bom won
for core-io. The BOM exists precisely to keep the family aligned - every
artifact in it shares ${revision} - and it was only half applying.
java-client 3.8.3 is built against core-io 3.8.x, so running it against
core-io 3.11.2 risks NoSuchMethodError / NoClassDefFoundError at runtime.
Moving the import above spring-boot-dependencies puts the whole
com.couchbase.client family on 3.11.2, the version the BOM already declared
and the version consuming apps are independently forcing. A comment now
records the ordering constraint, matching the ones added for log4j-bom and
jackson-bom in #485.
This is the same class of silent misconfiguration as the log4j-bom ordering
bug fixed in #485: the pom asserts one version and the build resolves
another, with no error.
Verified: a full before/after diff of the resolved tree shows exactly one
third-party change, java-client 3.8.3 -> 3.11.2, and nothing else moves.
spring-data-couchbase 5.5.13 is happy on SDK 3.11.2 - full reactor clean
install passes with 1700 tests green.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The bug
synapse resolves
java-client3.8.3 together withcore-io3.11.2 — a mismatched pair from the same SDK.java-client3.8.3 is compiled againstcore-io3.8.x. Running it against 3.11.2 risksNoSuchMethodError/NoClassDefFoundErrorat runtime.Cause
The
dependencyManagementfirst-declaration-wins rule again. Thecouchbase-client-bomimport sat below thespring-boot-dependenciesimport:com.couchbase.client:java-clientvia itscouchbase-client.versionproperty — 3.8.3 as of Boot 3.5.16 — so Boot won forjava-client.core-io(it's a transitive ofjava-client), socouchbase-client-bomwon forcore-io.Net effect: the SDK got split across two versions. The BOM exists precisely to prevent that — every artifact in it shares
${revision}— and it was only half applying.This is the same class of silent misconfiguration as the
log4j-bomordering bug fixed in #485: the pom asserts one version, the build resolves another, and nothing errors.The fix
Move the import above
spring-boot-dependencies, which puts the wholecom.couchbase.clientfamily on 3.11.2 — the version the BOM already declared, and the version consuming apps are independently forcing in their own remediation lists.A comment now records the ordering constraint, matching the ones added for
log4j-bomandjackson-bomin #485.Verification
java-client3.8.3 → 3.11.2. Nothing else moves — no accidental knock-on from the reordering.spring-data-couchbase5.5.13 is happy on SDK 3.11.2.mvn clean install -DskipITs— full reactor BUILD SUCCESS, 1700 tests, zero failures or errors.Note
No CVE is involved — this is a correctness/compatibility fix, found while cross-checking a consuming app's dependency remediation list against what synapse actually resolves.