2

尝试通过 Java lib 与 Google Cloud Bigtable 交互,并在成功创建连接对象后,发送“list”命令,我收到以下command.run()方法错误:

command.run(connection, argsList.subList(1, argsList.size()));

具体来说:

Jul 06, 2015 1:12:15 PM io.grpc.transport.netty.ProtocolNegotiators$AbstractBufferingHandler fail
SEVERE: Transport failed during protocol negotiation
io.netty.channel.ChannelPipelineException: io.grpc.transport.netty.ProtocolNegotiators$1$1.handlerAdded() has thrown an exception; removed.
at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:600)
at io.netty.channel.DefaultChannelPipeline.callHandlerAdded(DefaultChannelPipeline.java:582)
at io.netty.channel.DefaultChannelPipeline.addFirst0(DefaultChannelPipeline.java:124)
at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:108)
at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:291)
at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:246)
at io.grpc.transport.netty.ProtocolNegotiators$AbstractBufferingHandler.channelRegistered(ProtocolNegotiators.java:233)
at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelRegisteredNow(ChannelHandlerInvokerUtil.java:32)
at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRegistered(DefaultChannelHandlerInvoker.java:50)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRegistered(AbstractChannelHandlerContext.java:114)
at io.netty.channel.DefaultChannelPipeline.fireChannelRegistered(DefaultChannelPipeline.java:833)
at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:487)
at io.netty.channel.AbstractChannel$AbstractUnsafe.access$100(AbstractChannel.java:401)
at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:461)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:322)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:356)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:703)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: NPN/ALPN extensions not installed  

只是跟随; https://cloud.google.com/bigtable/docs/samples-simple-cli

任何帮助将不胜感激!

4

1 回答 1

5

有必要修改您的 eclipse java 运行以在所有其他类/jar 之前加载 alpn-boot jar。使用该行:

-Xbootclasspath/p:$(pwd)/lib/bigtable/alpn-boot-${ALPN_VERSION}.jar

有关详细信息,请参阅ALPN

对于 Maven 中的单元测试,您可以查看我们的示例

更新您现在可以使用带有 BoringSSL 的Netty TCNative jar 来在不带alpn-boot 的情况下工作,我们目前有两个示例,Managed-VM-SampleQuickstart。有关pom.xml详细信息,请参阅 MVM 示例显示如何设置您的 pom 以在本地编译和部署。Quickstart pom 显示了在同一机器上编译和运行的形式。我们希望所有的 Java 示例都能很快使用它。

于 2015-07-10T21:01:35.913 回答