JRuby Cassandra 问题
我正在使用 Jruby 连接 Cassandra 和 ruby。我正在开发一个必须与 Rails 中的 cassandra 交互的代码。我已经配置并安装了jruby。我还对 cassandra 和 jruby 的所有依赖项进行了“导入”。我在运行文件时遇到问题。我收到这样的错误。
=================================================== ===================================================
org/apache/thrift/transport/TIOStreamTransport.java:132:in `read': org.apache.thrift.transport.TTransportException: null (NativeException)
from org/apache/thrift/transport/TTransport.java:84:in `readAll'
from org/apache/thrift/protocol/TBinaryProtocol.java:378:in `readAll'
from org/apache/thrift/protocol/TBinaryProtocol.java:297:in `readI32'
from org/apache/thrift/protocol/TBinaryProtocol.java:204:in `readMessageBegin'
from org/apache/cassandra/thrift/Cassandra.java:1062:in `recv_describe_cluster_name'
from org/apache/cassandra/thrift/Cassandra.java:1048:in `describe_cluster_name'
from sun/reflect/NativeMethodAccessorImpl.java:-2:in `invoke0'
from sun/reflect/NativeMethodAccessorImpl.java:39:in `invoke'
... 13 levels...
from org/jruby/Main.java:203:in `run'
from org/jruby/Main.java:100:in `run'
from org/jruby/Main.java:84:in `main'
=================================================== ==========
谁能帮我解决这个问题?
I am using Jruby to connect Cassandra and ruby. I am developing a code which had to interact with cassandra from Rails. I have configured and installed jruby. I also did the "import" for all the dependencies for both cassandra and jruby. I am getting issues when running the file. I am getting error like this.
==================================================================================
org/apache/thrift/transport/TIOStreamTransport.java:132:in `read': org.apache.thrift.transport.TTransportException: null (NativeException)
from org/apache/thrift/transport/TTransport.java:84:in `readAll'
from org/apache/thrift/protocol/TBinaryProtocol.java:378:in `readAll'
from org/apache/thrift/protocol/TBinaryProtocol.java:297:in `readI32'
from org/apache/thrift/protocol/TBinaryProtocol.java:204:in `readMessageBegin'
from org/apache/cassandra/thrift/Cassandra.java:1062:in `recv_describe_cluster_name'
from org/apache/cassandra/thrift/Cassandra.java:1048:in `describe_cluster_name'
from sun/reflect/NativeMethodAccessorImpl.java:-2:in `invoke0'
from sun/reflect/NativeMethodAccessorImpl.java:39:in `invoke'
... 13 levels...
from org/jruby/Main.java:203:in `run'
from org/jruby/Main.java:100:in `run'
from org/jruby/Main.java:84:in `main'
==============================================================================
Can anyone help me with this issue ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以发布您的代码吗?仅通过堆栈跟踪很难进行调试。
看起来您正在使用原始 thrift,有一个用于 java cassandra 客户端库的 jruby 包装器 < href="https://github.com/rantav/hector" rel="nofollow">hector 会更容易使用。
Can you post your code, it is hard to debug from just the stack trace.
It looks like you are using raw thrift, there is a jruby wrapper for the java cassandra client library hector that will be easier to use.