It appears that spring-boot-starter-data-couchbase version 3.3.1 is using Couchbase client version 3.6.0, despite the issue supposedly being resolved in Spring Boot Issue #40737.

However, spring-boot-dependencies version 3.3.1 uses Couchbase client version 3.6.2. This version mismatch leads to a NoSuchMethodError exception when both are used together, as shown below:

java.lang.NoSuchMethodError: 'reactor.core.publisher.Mono com.couchbase.client.core.transaction.CoreTransactionAttemptContext.insert(com.couchbase.client.core.io.CollectionIdentifier, java.lang.String, byte[], com.couchbase.client.core.transaction.support.SpanWrapper)'

at org.springframework.data.couchbase.core.ReactiveInsertByIdOperationSupport$ReactiveInsertByIdSupport.lambda$one$2(ReactiveInsertByIdOperationSupport.java:119) ~[spring-data-couchbase-5.3.1.jar!/:5.3.1]

As a workaround, we currently have to downgrade the Couchbase client version to 3.6.0 when using spring-boot-dependencies 3.3.1, which is not ideal.

Steps to Reproduce:

  • Set up a Spring Boot project with spring-boot-starter-data-couchbase version 3.3.1.
  • Use spring-boot-dependencies version 3.3.1.
  • Attempt to perform a reactive Couchbase insert operation.
  • Observe the NoSuchMethodError exception.

Expected Behavior: The spring-boot-starter-data-couchbase should be compatible with the Couchbase client version specified in spring-boot-dependencies without causing runtime exceptions.

Actual Behavior:

A NoSuchMethodError exception is thrown due to a version mismatch between spring-boot-starter-data-couchbase and the Couchbase client version specified in spring-boot-dependencies.

Environment:

  • Spring Boot version: 3.3.1
  • Spring Boot Starter Data Couchbase version: 3.3.1
  • Couchbase client version: 3.6.2 (as specified by spring-boot-dependencies 3.3.1)

Possible Solution:

Ensure that spring-boot-starter-data-couchbase is updated to use the Couchbase client version specified in spring-boot-dependencies or provide guidance on how to handle this version mismatch.

Comment From: wilkinsona

Thanks for the report. All that we could do here would be to downgrade to Couchbase Client dependency to 3.6.0. We don't want to do that as users who aren't affected by the problem you have reported may be relying on fixes made in 3.6.1 and 3.6.2. I think the best way to address this would be to update Spring Data Couchbase so that it's compatible with 3.6.2. To that end, please open a Spring Data Couchbase issue.

Comment From: maksutspahi

Thanks for the quick reply.

Comment From: mikereiche

I'm looking into this.