You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I previously reported an issue with spring-boot-starter-data-couchbase version 3.3.1 using Couchbase client version 3.6.0, which leads to a NoSuchMethodError exception when used with spring-boot-dependencies version 3.3.1 that specifies Couchbase client version 3.6.2. The Spring Boot team suggested that downgrading the Couchbase client dependency is not a viable solution as it may affect users relying on fixes made in versions 3.6.1 and 3.6.2.
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:
Spring Data Couchbase should be compatible with Couchbase client version 3.6.2 to avoid runtime exceptions.
Actual Behavior:
A NoSuchMethodError exception is thrown due to a version mismatch between Spring 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 -> uses spring-data-couchbase 5.3.1
Couchbase client version: 3.6.2 (as specified by spring-boot-dependencies 3.3.1)
Exception Log:
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]
Response from Spring Boot Team:
"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." (spring-projects/spring-boot#41445 (comment))
Possible Solution:
Update Spring Data Couchbase to be compatible with Couchbase client version 3.6.2 to resolve this compatibility issue.
Please let me know if any additional information is needed. Thank you for your attention to this matter.
The text was updated successfully, but these errors were encountered:
I'm not understanding why/how spring-boot-depdendencies version 3.3.1 specifies Couchbase Client version 3.6.2. Why doesn't it just rely on spring-data-couchbase for that? Which has the depdendency of Couchbase Client version 3.6.0.
That is the only version that we build and test with.
Spring Boot's dependency management includes 3.6.2 as it's the latest patch release of the client. Our goal is to keep third-party dependencies up-to-date so that users can benefit from the latest bug fixes.
Spring Boot includes auto-configuration for both Couchbase (CouchbaseAutoConfiguration) and Spring Data Couchbase (CouchbaseDataAutoConfiguration and CouchbaseReactiveDataAutoConfiguration). This leaves us in a tricky situation as we can either hold bug fixes back from those only using the former or have an incompatibility that affects some users of the latter. Neither's ideal.
I think there are a few options here. In order of preference, they are:
Updates are made to the Couchbase Client and 3.6.3 is released that's backwards compatible with 3.6.1 and 3.6.0
Updates are made to Spring Data Couchbase so that it's compatible with the breaking changes in 3.6.2
Spring Boot downgrades back to 3.6.0
I'd really like to avoid 3 as it just hides the problem rather than solving it. Anyone who is using Spring Data Couchbase and needs to pick up a bug fix that was made in 3.6.2 will potentially be unable to do so due to the incompatibility. Furthermore, any Spring Boot users who's not using Spring Data Couchbase or is not affected by the current incompatibility will then be exposed to bugs that have already been fixed and will have to manually upgrade.
Description:
I previously reported an issue with
spring-boot-starter-data-couchbase
version 3.3.1 using Couchbase client version 3.6.0, which leads to aNoSuchMethodError
exception when used withspring-boot-dependencies
version 3.3.1 that specifies Couchbase client version 3.6.2. The Spring Boot team suggested that downgrading the Couchbase client dependency is not a viable solution as it may affect users relying on fixes made in versions 3.6.1 and 3.6.2.Steps to Reproduce:
spring-boot-starter-data-couchbase
version 3.3.1.spring-boot-dependencies
version 3.3.1.NoSuchMethodError
exception.Expected Behavior:
Spring Data Couchbase should be compatible with Couchbase client version 3.6.2 to avoid runtime exceptions.
Actual Behavior:
A
NoSuchMethodError
exception is thrown due to a version mismatch between Spring Data Couchbase and the Couchbase client version specified inspring-boot-dependencies
.Environment:
spring-boot-dependencies
3.3.1)Exception Log:
Response from Spring Boot Team:
Possible Solution:
Update Spring Data Couchbase to be compatible with Couchbase client version 3.6.2 to resolve this compatibility issue.
Please let me know if any additional information is needed. Thank you for your attention to this matter.
The text was updated successfully, but these errors were encountered: