当试图通过grpc运行一个简单的scala协议缓冲客户端时,我得到以下异常。有什么我应该添加到我的build.sbt
[error] (grpc-default-executor-1) java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured.
java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured.
at io.grpc.netty.GrpcSslContexts.selectApplicationProtocolConfig(GrpcSslContexts.java:153)
at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:130)
at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:119)
at io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:90)
at io.grpc.netty.NettyChannelBuilder.createProtocolNegotiator(NettyChannelBuilder.java:265)
at io.grpc.netty.NettyChannelBuilder$NettyTransportFactory.newClientTransport(NettyChannelBuilder.java:324)
at io.grpc.internal.CallCredentialsApplyingTransportFactory.newClientTransport(CallCredentialsApplyingTransportFactory.java:62)
at io.grpc.internal.TransportSet.startNewTransport(TransportSet.java:215)
at io.grpc.internal.TransportSet.obtainActiveTransport(TransportSet.java:192)
at io.grpc.internal.ManagedChannelImpl$3.getTransport(ManagedChannelImpl.java:651)
at io.grpc.internal.ManagedChannelImpl$3.getTransport(ManagedChannelImpl.java:592)
at io.grpc.DummyLoadBalancerFactory$DummyLoadBalancer$1.get(DummyLoadBalancerFactory.java:135)
at io.grpc.internal.DelayedClientTransport$2.run(DelayedClientTransport.java:262)
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)
答案 0 :(得分:0)
您可以阅读本文档中的TLS设置,并在类路径中添加正确的依赖项,具体取决于您的系统是否为android