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

AbstractMethodError from gRPC client on 0.1.3 #43

Open
vegarsti opened this issue Aug 20, 2019 · 1 comment
Open

AbstractMethodError from gRPC client on 0.1.3 #43

vegarsti opened this issue Aug 20, 2019 · 1 comment

Comments

@vegarsti
Copy link

vegarsti commented Aug 20, 2019

I'm getting a severe error with 0.1.3. It doesn't happen with 0.1.2 (or other previous versions). I'm using Lightstep, with packages lightstep-tracer-jre which is 0.17.0, and tracer-grpc at 0.18.0. I'm not sure what happens, but it seems to be similar to this previous issue.

Here is the error:

SEVERE: [Channel<1>: (logging.googleapis.com:443)] Uncaught exception in the SynchronizationContext. Panic!
java.lang.AbstractMethodError: io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder$NettyTransportFactory.newClientTransport(Ljava/net/SocketAddress;Lio/grpc/internal/ClientTransportFactory$ClientTransportOptions;Lio/grpc/ChannelLogger;)Lio/grpc/internal/ConnectionClientTransport;
	at io.grpc.internal.CallCredentialsApplyingTransportFactory.newClientTransport(CallCredentialsApplyingTransportFactory.java:49)
	at io.grpc.internal.InternalSubchannel.startNewTransport(InternalSubchannel.java:246)
	at io.grpc.internal.InternalSubchannel.access$400(InternalSubchannel.java:65)
	at io.grpc.internal.InternalSubchannel$2.run(InternalSubchannel.java:196)
	at io.grpc.SynchronizationContext.drain(SynchronizationContext.java:95)
	at io.grpc.SynchronizationContext.execute(SynchronizationContext.java:127)
	at io.grpc.internal.ManagedChannelImpl$NameResolverListener.onResult(ManagedChannelImpl.java:1365)
	at io.grpc.internal.DnsNameResolver$Resolve.resolveInternal(DnsNameResolver.java:311)
	at io.grpc.internal.DnsNameResolver$Resolve.run(DnsNameResolver.java:213)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Any thoughts?

@malafeev
Copy link
Contributor

@vegarsti most likely that in your classpath there are several incompatible grpc versions:
one from this library, another from tracer-grpc and probably third one from your application.
you can check via mvn dependency:tree (if you use maven).

I can propose 2 solutions:

  1. Exclude grpc from this library dependencies:
<dependency>
      <groupId>io.opentracing.contrib</groupId>
      <artifactId>opentracing-grpc</artifactId>
      <version>0.1.3</version>
      <exclusions>
        <exclusion>
          <groupId>io.grpc</groupId>
          <artifactId>grpc-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  1. Don't use tracer-grpc. Instead use tracer-okhttp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants