Azure-sdk-for-java: [QUERY] spring cosmos 3.5.1 is backward compaitable in spring boot

Created on 6 Apr 2021  路  2Comments  路  Source: Azure/azure-sdk-for-java

Query/Question
I tried to use spring cosmos 3.5.1 in spring boot 2.2 but getting NoClassDefFoundError: reactor.util.context.ContextView.
if incase of updating the spring boot is only way or any way without updating spring boot because of i need to use spring boot 2.2 version

and also there 3.4.0 auditing bug where it will not update createdate and createdby.

Why is this not a Bug or a feature Request?
a kinda query

Setup (please complete the following information if applicable):

  • OS: windows
  • IDE : IntelliJ
  • Version of the Library used 3.4.0
Client azure-spring azure-spring-cosmos customer-reported question

Most helpful comment

Thanks fixed this issue by adding bom

mavenBom "io.projectreactor:reactor-bom:2020.0.4"

and netty dependeciey

compile "io.projectreactor.netty:reactor-netty-core:1.0.4"

All 2 comments

spring-boot: 2.2.9.RELEASE managed reactor-core version: 3.3.8.RELEASE.
Refs:

  1. https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-dependencies/2.2.9.RELEASE/spring-boot-dependencies-2.2.9.RELEASE.pom
  2. https://repo1.maven.org/maven2/io/projectreactor/reactor-bom/Dysprosium-SR10/reactor-bom-Dysprosium-SR10.pom

azure-spring-data-cosmos: 3.5.0 required reactor-core version: 3.4.3.
Refs:

  1. https://github.com/Azure/azure-sdk-for-java/blob/azure-spring-data-cosmos_3.5.0/eng/versioning/external_dependencies.txt#L62

My suggestion:

  • Solution 1: Add following content in pom.xml:
    <dependency>
      <groupId>io.projectreactor</groupId>
      <artifactId>reactor-core</artifactId>
      <version>3.4.3</version>
    </dependency>

If problem still exists after the 2 solutions, please share your pom.xml.

Thanks fixed this issue by adding bom

mavenBom "io.projectreactor:reactor-bom:2020.0.4"

and netty dependeciey

compile "io.projectreactor.netty:reactor-netty-core:1.0.4"

Was this page helpful?
0 / 5 - 0 ratings