Giter Site home page Giter Site logo

Comments (9)

github-actions avatar github-actions commented on September 23, 2024

@anuchandy @conniey @lmolkova

from azure-sdk-for-java.

github-actions avatar github-actions commented on September 23, 2024

Thank you for your feedback. Tagging and routing to the team member best able to assist.

from azure-sdk-for-java.

anuchandy avatar anuchandy commented on September 23, 2024

Hello @MBurchard, you're correct, library has switched from Jackson to azure-xml since 7.16.0, but this also needs the azure-core:1.48.0 (as specified in azure-messaging-servicebus:7.16.0 POM file).

It is possible that applications have other dependencies that override the needed azure-core:1.48.0, leading class-loader to resolve an older version instead. You can verify such a dependency conflict using "maven dependency:tree". In this case, you want to manually update the versions of other dependencies that cause this conflict (Between Azure SDK also offer BOM).

from azure-sdk-for-java.

alzimmermsft avatar alzimmermsft commented on September 23, 2024

Hi @MBurchard, I was able to verify what @anuchandy mentioned, where aligning the azure-core version to match what azure-messaging-servicebus 7.16.0 released using (1.48.0) resolves the LinkageError being seen.

I'm also "+1"'ing Anu's recommendation to use azure-sdk-bom as a dependency manager to ensure version compatibility between Azure SDKs.

from azure-sdk-for-java.

github-actions avatar github-actions commented on September 23, 2024

Hi @MBurchard. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.

from azure-sdk-for-java.

MBurchard avatar MBurchard commented on September 23, 2024

@anuchandy Thank you for your answer.

I'm using the following Gradle configuration.

dependencyManagement {
  imports {
    mavenBom("com.azure.spring:spring-cloud-azure-dependencies:5.11.0")
  }
}

dependencies {
  implementation("com.auth0:java-jwt:4.4.0")
  implementation("com.azure:azure-messaging-servicebus:7.15.2") // or 7.16.0 which has this LinkagerError
  implementation("com.azure.spring:spring-cloud-azure-starter-servicebus-jms")
  implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
  implementation("com.github.ben-manes.caffeine:caffeine")
  implementation("com.microsoft.graph:microsoft-graph:6.8.0")
  implementation("io.hypersistence:hypersistence-utils-hibernate-63:3.7.5")
  implementation("io.github.microutils:kotlin-logging-jvm:3.0.5")
  implementation("net.javacrumbs.shedlock:shedlock-provider-jdbc-template:5.13.0")
  implementation("net.javacrumbs.shedlock:shedlock-spring:5.13.0")
  implementation("org.apache.maven:maven-artifact:3.9.6")
  implementation("org.apache.commons:commons-lang3:3.14.0")
  implementation("org.apache.commons:commons-text:1.12.0")
  implementation("org.jetbrains.kotlin:kotlin-reflect")
  implementation("org.springframework.boot:spring-boot-starter-actuator")
  implementation("org.springframework.boot:spring-boot-starter-cache")
  implementation("org.springframework.boot:spring-boot-starter-data-jpa")
  implementation("org.springframework.boot:spring-boot-starter-data-redis")
  implementation("org.springframework.boot:spring-boot-starter-mail")
  implementation("org.springframework.boot:spring-boot-starter-mustache")
  implementation("org.springframework.boot:spring-boot-starter-security")
  implementation("org.springframework.boot:spring-boot-starter-validation")
  implementation("org.springframework.boot:spring-boot-starter-web")
  implementation("org.springframework.security:spring-security-oauth2-jose")

  developmentOnly("org.springframework.boot:spring-boot-devtools")

  runtimeOnly("com.microsoft.sqlserver:mssql-jdbc")
  runtimeOnly("org.liquibase:liquibase-core")

  testImplementation("com.ninja-squad:springmockk:$springMockKVersion")
  testImplementation("org.springframework.boot:spring-boot-starter-test")
  testImplementation("org.springframework.security:spring-security-test")
  testImplementation("org.apache.commons:commons-csv:1.11.0")

  testRuntimeOnly("com.h2database:h2")
}

All versions that are not explicitly specified are resolved by Spring Boot and are definitely the latest versions.
Changing to com.azure:azure-messaging-servicebus:7.16.0 breaks the project.

Where, why and how do I add the azure-core version 1.48.0 which I seem to never have needed before?
Why is the "automatic" resolution of dependencies suddenly broken?
/unresolve

from azure-sdk-for-java.

alzimmermsft avatar alzimmermsft commented on September 23, 2024

Hi @MBurchard, as part of the release of azure-messaging-servicebus 7.16.0 it took dependencies on new features provided by azure-core 1.48.0 to support the removal of Jackson Dataformat XML.

As for what is causing azure-core 1.47.0 to be resolved when azure-messaging-servicebus 7.16.0 is being used, which references azure-core 1.48.0 explicitly, it's mavenBom("com.azure.spring:spring-cloud-azure-dependencies:5.11.0") as it is using azure-core 1.47.0 as the resolving version. If azure-messaging-servicebus wasn't explicitly defined in your Gradle configuration it would resolve to 7.15.2 as that is the version the Spring Cloud Azure Dependencies BOM is using as well.

Until the Azure Spring BOM has another release I'd recommend defining azure-core in your Gradle configuration explicitly for now.

dependencies {
  implementation("com.auth0:java-jwt:4.4.0")
  implementation("com.azure:azure-core:1.48.0")
  implementation("com.azure:azure-messaging-servicebus:7.16.0")
  ...

from azure-sdk-for-java.

github-actions avatar github-actions commented on September 23, 2024

Hi @MBurchard. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

from azure-sdk-for-java.

MBurchard avatar MBurchard commented on September 23, 2024

Hi @MBurchard, as part of the release of azure-messaging-servicebus 7.16.0 it took dependencies on new features provided by azure-core 1.48.0 to support the removal of Jackson Dataformat XML.

As for what is causing azure-core 1.47.0 to be resolved when azure-messaging-servicebus 7.16.0 is being used, which references azure-core 1.48.0 explicitly, it's mavenBom("com.azure.spring:spring-cloud-azure-dependencies:5.11.0") as it is using azure-core 1.47.0 as the resolving version. If azure-messaging-servicebus wasn't explicitly defined in your Gradle configuration it would resolve to 7.15.2 as that is the version the Spring Cloud Azure Dependencies BOM is using as well.

Until the Azure Spring BOM has another release I'd recommend defining azure-core in your Gradle configuration explicitly for now.

dependencies {
  implementation("com.auth0:java-jwt:4.4.0")
  implementation("com.azure:azure-core:1.48.0")
  implementation("com.azure:azure-messaging-servicebus:7.16.0")
  ...

Ah interesting, thanks for the hint that I can omit the version at 'com.azure:azure-messaging-servicebus'.
I'm waiting and not using 7.16.0, but waiting for the next release of 'com.azure.spring:spring-cloud-azure-dependencies'

from azure-sdk-for-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.