NoSuchMethodError:io.netty.handler.codec.http.HttpResponseStatus.codeAsText()Lio/netty/util/AsciiStr

1,967 views
Skip to first unread message

somnat...@infiverve.com

unread,
Jun 6, 2017, 7:33:05 AM6/6/17
to grpc.io
I am using java 1.8 and trying to connect my java grpc-client to ruby grpc server using grpc (1.3.0.0)
but at the time of execution it's giving me following exeption:

java.lang.NoSuchMethodError: io.netty.handler.codec.http.HttpResponseStatus.codeAsText()Lio/netty/util/AsciiString;
at io.netty.handler.codec.http2.Http2ConnectionHandler.<clinit>(Http2ConnectionHandler.java:69)
at io.grpc.netty.NettyClientTransport.start(NettyClientTransport.java:190)
at io.grpc.internal.ForwardingConnectionClientTransport.start(ForwardingConnectionClientTransport.java:44)
at io.grpc.internal.InternalSubchannel.startNewTransport(InternalSubchannel.java:216)
at io.grpc.internal.InternalSubchannel.obtainActiveTransport(InternalSubchannel.java:186)
at io.grpc.internal.ManagedChannelImpl$SubchannelImplImpl.obtainActiveTransport(ManagedChannelImpl.java:812)
at io.grpc.internal.GrpcUtil.getTransportFromPickResult(GrpcUtil.java:592)
at io.grpc.internal.DelayedClientTransport.reprocess(DelayedClientTransport.java:295)
at io.grpc.internal.ManagedChannelImpl$LbHelperImpl$5.run(ManagedChannelImpl.java:718)
at io.grpc.internal.ChannelExecutor.drain(ChannelExecutor.java:87)
at io.grpc.internal.ManagedChannelImpl$LbHelperImpl.runSerialized(ManagedChannelImpl.java:709)
at io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl.onAddresses(ManagedChannelImpl.java:758)
at io.grpc.internal.DnsNameResolver$1.run(DnsNameResolver.java:175)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Note: grpc server is implemented in c-ruby.

thank you in advance!

Carl Mastrangelo

unread,
Jun 6, 2017, 1:43:16 PM6/6/17
to grpc.io, somnat...@infiverve.com
Do you know what version of gRPC Java you are using?  Is it possible you are depending on two different versions of Netty?

somnat...@infiverve.com

unread,
Jun 8, 2017, 12:16:37 AM6/8/17
to grpc.io, somnat...@infiverve.com
I am using grpc version 1.3.0 can you help me out how to solve this problem.?

Carl Mastrangelo

unread,
Jun 9, 2017, 5:51:12 PM6/9/17
to grpc.io, somnat...@infiverve.com
It seems like you may have two copies of netty in your code.  If you are using gradle, can you print out the dependencies of your project?  It should come out of something like:

./gradlew :dependencies

uden...@gmail.com

unread,
Aug 22, 2017, 6:02:42 AM8/22/17
to grpc.io, somnat...@infiverve.com
hi~ have u solved that problem ? i'm facing the same exception..thx

在 2017年6月6日星期二 UTC+8下午7:33:05,somnat...@infiverve.com写道:

Eric Anderson

unread,
Aug 23, 2017, 7:02:44 PM8/23/17
to uden...@gmail.com, grpc.io, somnat...@infiverve.com
You're using a different/wrong version of Netty. grpc-java is quite particular about the version of Netty being used and needs exactly what its dependency specifies.

Eventually we'll have a pre-shaded Netty transport that should avoid most versioning issues.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/fb68ddff-13be-4542-975a-d5603a84ff02%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages