我正在使用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'
=============================================== ===============================
任何人都可以帮我解决这个问题吗?
答案 0 :(得分:1)
你可以发布你的代码,很难从堆栈跟踪调试。
看起来你正在使用原始thrift,java cassandra客户端库jruby wrapper有一个hector,它更容易使用。