Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Could not resolve" error when upgrading from 1.22.0-alpha to 1.23.0-alpha (and newer versions) #9949

Closed
rBrda opened this issue Nov 24, 2023 · 0 comments · Fixed by #10066
Closed
Labels
bug Something isn't working needs triage New issue that requires triage

Comments

@rBrda
Copy link

rBrda commented Nov 24, 2023

Describe the bug

Originally mentioned in Xray propagator not resolved in Spring Boot project.

We've got a Spring Boot project where we would like to implement Opentelemetry tracing using the io.opentelemetry.instrumentation:opentelemetry-spring-boot-starter package.

Currently we use version 1.22.0-alpha (and other related Otel packages) since we're unable to upgrade to newer versions.

When we try to upgrade the version number from 1.22.0-alpha to 1.23.0-alpha (for example), we receive the following error message during build:

Execution failed for task ':bootJarMainClassName'.
> Could not resolve all files for configuration ':runtimeClasspath'.
   > Could not resolve io.opentelemetry.instrumentation:opentelemetry-spring-webmvc-6.0:1.23.0-alpha.
     Required by:
         project :
         project : > io.opentelemetry.instrumentation:opentelemetry-spring-boot-starter:1.23.0-alpha > io.opentelemetry.instrumentation:opentelemetry-spring-boot:1.23.0-alpha
      > No matching variant of io.opentelemetry.instrumentation:opentelemetry-spring-webmvc-6.0:1.23.0-alpha was found. The consumer was configured to find a runtime of a library compatible with Java 11, packaged as a jar, and its dependencies declared externally but:
          - Variant 'apiElements' capability io.opentelemetry.instrumentation:opentelemetry-spring-webmvc-6.0:1.23.0-alpha declares a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11
          - Variant 'javadocElements' capability io.opentelemetry.instrumentation:opentelemetry-spring-webmvc-6.0:1.23.0-alpha declares a runtime of a component, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 11)
                  - Doesn't say anything about its elements (required them packaged as a jar)
          - Variant 'runtimeElements' capability io.opentelemetry.instrumentation:opentelemetry-spring-webmvc-6.0:1.23.0-alpha declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 11
          - Variant 'sourcesElements' capability io.opentelemetry.instrumentation:opentelemetry-spring-webmvc-6.0:1.23.0-alpha declares a runtime of a component, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 11)
                  - Doesn't say anything about its elements (required them packaged as a jar)

Spring Boot: 2.6.6
JDK: 11.0.13
Gradle: 6.9

Steps to reproduce

Try to set up a Spring Boot project and include the io.opentelemetry.instrumentation:opentelemetry-spring-boot-starter package with the version 1.23.0-alpha using Gradle.

Expected behavior

The io.opentelemetry.instrumentation:opentelemetry-spring-boot-starter package can be upgraded to 1.23.0-alpha (and newer).

Actual behavior

Build fails with error message complaining about io.opentelemetry.instrumentation:opentelemetry-spring-webmvc-6.0:1.23.0-alpha that it was not found. Also we a prompted that there is a requirement for JDK 17.

Javaagent or library instrumentation version

1.23.0

Environment

JDK: 11.0.13
OS: MacOS 13.6

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New issue that requires triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant