NoClassDefFoundError: Could not initialize class io.opentelemetry.javaagent.instrumentation.netty.v4_0.AttributeKeys

See original GitHub issue

My application had started failure when I used the OpenTelemetry agent.

Here are the pieces of information:

Here is my java agent version: image

Here is the error message:

 ERROR 15548 [     parallel-5] reactor.core.scheduler.Schedulers        : Scheduler worker in group main failed with an uncaught exception
java.lang.NoClassDefFoundError: Could not initialize class io.opentelemetry.javaagent.instrumentation.netty.v4_0.AttributeKeys
	at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:305)
	at io.lettuce.core.protocol.DefaultEndpoint.channelWriteAndFlush(DefaultEndpoint.java:342)
	at io.lettuce.core.protocol.DefaultEndpoint.writeToChannelAndFlush(DefaultEndpoint.java:282)
	at io.lettuce.core.protocol.DefaultEndpoint.write(DefaultEndpoint.java:142)
	at io.lettuce.core.protocol.CommandExpiryWriter.write(CommandExpiryWriter.java:112)
	at io.lettuce.core.RedisChannelHandler.dispatch(RedisChannelHandler.java:184)
	at io.lettuce.core.StatefulRedisConnectionImpl.dispatch(StatefulRedisConnectionImpl.java:152)
	at io.lettuce.core.RedisPublisher$RedisSubscription.dispatchCommand(RedisPublisher.java:390)
	at io.lettuce.core.RedisPublisher$CommandDispatch$1.dispatch(RedisPublisher.java:477)
	at io.lettuce.core.RedisPublisher$RedisSubscription.checkCommandDispatch(RedisPublisher.java:385)
	at io.lettuce.core.RedisPublisher$State$2.request(RedisPublisher.java:543)
	at io.lettuce.core.RedisPublisher$RedisSubscription.request(RedisPublisher.java:242)
	at reactor.core.publisher.MonoNext$NextSubscriber.request(MonoNext.java:102)
	at reactor.core.publisher.MonoFlatMap$FlatMapInner.onSubscribe(MonoFlatMap.java:230)
	at io.opentelemetry.javaagent.shaded.instrumentation.reactor.TracingSubscriber.onSubscribe(TracingSubscriber.java:53)
	at reactor.core.publisher.MonoNext$NextSubscriber.onSubscribe(MonoNext.java:64)
	at io.lettuce.core.RedisPublisher$State$1.subscribe(RedisPublisher.java:522)
	at io.lettuce.core.RedisPublisher$RedisSubscription.subscribe(RedisPublisher.java:225)
	at io.lettuce.core.RedisPublisher.subscribe(RedisPublisher.java:126)
	at reactor.core.publisher.MonoFromPublisher.subscribe(MonoFromPublisher.java:43)
	at reactor.core.publisher.MonoLift.subscribe(MonoLift.java:45)
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:150)
	at io.opentelemetry.javaagent.shaded.instrumentation.reactor.TracingSubscriber.lambda$onNext$0(TracingSubscriber.java:58)
	at io.opentelemetry.javaagent.shaded.instrumentation.reactor.TracingSubscriber.withActiveSpan(TracingSubscriber.java:79)
	at io.opentelemetry.javaagent.shaded.instrumentation.reactor.TracingSubscriber.onNext(TracingSubscriber.java:58)
	at reactor.core.publisher.FluxDefaultIfEmpty$DefaultIfEmptySubscriber.onNext(FluxDefaultIfEmpty.java:92)
	at io.opentelemetry.javaagent.shaded.instrumentation.reactor.TracingSubscriber.lambda$onNext$0(TracingSubscriber.java:58)
	at io.opentelemetry.javaagent.shaded.instrumentation.reactor.TracingSubscriber.withActiveSpan(TracingSubscriber.java:79)
	at io.opentelemetry.javaagent.shaded.instrumentation.reactor.TracingSubscriber.onNext(TracingSubscriber.java:58)
	at reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:127)
	at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1515)
	at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:241)
....

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
qiansheng91commented, Nov 19, 2021

@laurit @mateuszrzeszutek Thanks all, it works.

0reactions
qiansheng91commented, Nov 16, 2021

@mateuszrzeszutek Thanks very much. @laurit OK, I will try it. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nightly build failed · Issue #1077 · open-telemetry ... - GitHub
OtlpGrpcSpanExporter - Failed to export spans java.lang.NoClassDefFoundError: Could not initialize class io.grpc.
Read more >
Could not initialize class java.lang.invoke.CallSite
I'm trying to print out all methods used in a java program. For this I have created a java agent that uses instrumentation...
Read more >
Automatic Instrumentation | OpenTelemetry
Automatic instrumentation with Java uses a Java agent JAR that can be attached to any Java 8+ application. It dynamically injects bytecode ...
Read more >
Could not initialize class com.ibm.rmi.io.ObjectSerializer after ...
NoClassDefFoundError : Could not initialize class com.ibm.rmi.io.ObjectSerializer. org.omg.CORBA.UNKNOWN: Unexpected exception found while rethrowing pending ...
Read more >
open-telemetry/opentelemetry-java - Gitter
NoClassDefFoundError : io/opentelemetry/common/AttributeConsumer at io.opentelemetry.exporters.otlp ... TLS works fine, but I can't export spans using mTLS .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found