Skip to content

Fix split Couchbase SDK by moving couchbase-client-bom above Boot's import - #497

Open
Linesmerrill wants to merge 1 commit into
developfrom
bugfix/align-couchbase-sdk-bom-import-order
Open

Fix split Couchbase SDK by moving couchbase-client-bom above Boot's import#497
Linesmerrill wants to merge 1 commit into
developfrom
bugfix/align-couchbase-sdk-bom-import-order

Conversation

@Linesmerrill

Copy link
Copy Markdown
Member

The bug

synapse resolves java-client 3.8.3 together with core-io 3.11.2 — a mismatched pair from the same SDK.

com.couchbase.client:core-io:jar:3.11.2
com.couchbase.client:java-client:jar:3.8.3      <-- wrong

java-client 3.8.3 is compiled against core-io 3.8.x. Running it against 3.11.2 risks NoSuchMethodError / NoClassDefFoundError at runtime.

Cause

The dependencyManagement first-declaration-wins rule again. 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 — so Boot won for java-client.
  • Boot does not manage core-io (it's a transitive of java-client), so couchbase-client-bom won for core-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-bom ordering 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 whole com.couchbase.client family on 3.11.2 — the version the BOM already declared, and the version consuming apps are independently forcing in their own remediation lists.

com.couchbase.client:core-io:jar:3.11.2
com.couchbase.client:java-client:jar:3.11.2     <-- aligned

A comment now records the ordering constraint, matching the ones added for log4j-bom and jackson-bom in #485.

Verification

  • Before/after diff of the entire resolved tree: exactly one third-party change, java-client 3.8.3 → 3.11.2. Nothing else moves — no accidental knock-on from the reordering.
  • spring-data-couchbase 5.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.

…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>
@Linesmerrill
Linesmerrill requested a review from a team as a code owner August 5, 2026 20:07
@Linesmerrill
Linesmerrill requested a review from veeru45 August 5, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant