-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Trino JDBC] NoClassDefFoundError io/opentelemetry/semconv/SemanticAttributes #21689
Comments
I reopen because it's actually a different issue than #21104: having |
Hitting the same issue |
I'm running into this as well. It appears to me that shading isn't done properly for various opentelemetry dependencies? <relocation>
<pattern>io.opentelemetry.extension</pattern>
<shadedPattern>${shadeBase}.opentelemetry.extension</shadedPattern>
</relocation>
<relocation>
<pattern>io.opentelemetry.instrumentation</pattern>
<shadedPattern>${shadeBase}.opentelemetry.instrumentation</shadedPattern>
</relocation>
<relocation>
<pattern>io.opentelemetry.api.incubator</pattern>
<shadedPattern>${shadeBase}.opentelemetry.api.incubator</shadedPattern>
</relocation> |
OTEL shouldn't be shaded at all. I'll merge soon a change that excludes OTEL entirely so it will be provided only externally. |
Preamble
I'm logging this as an issue to help other people facing it to find the explanation and solution but I believe the root cause is close to the one described in #21104.
Issue
Getting
java.lang.NoClassDefFoundError: io/opentelemetry/semconv/SemanticAttributes
when:trino-jdbc
445io.opentelemetry:opentelemetry-api
(and optionally others OTEL dependencies) as a dependency in the classpathio.opentelemetry.semconv:opentelemetry-semconv
as a dependency in the classpathThis is a regular setup when using the OpenTelemetry java agent: the classpath only contains the opentelemetry-api but all the SDK is in a separate classpath for the java agent.
Complete stacktrace:
Fix
Force to have a (recent)
io.opentelemetry.semconv:opentelemetry-semconv
dependency in the classpath.The text was updated successfully, but these errors were encountered: