Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary incompatibility with cassandra 1.2.6 #352

Closed
tsachev opened this issue Jul 2, 2013 · 6 comments
Closed

Binary incompatibility with cassandra 1.2.6 #352

tsachev opened this issue Jul 2, 2013 · 6 comments

Comments

@tsachev
Copy link
Contributor

tsachev commented Jul 2, 2013

Hi I am trying to update my dependencies to the latest cassandara 1.2.x version currently 1.2.6.
There seems to be binary incompatibility in cassandra thirft TBinaryProtocol.
The constructor signature has been changed. :(.
I think that using TBinaryProtocol.Factory instead of TBinaryProtocol will fix the problem.

so

cassandraClient = new Cassandra.Client(new TBinaryProtocol(transport));

in ThriftConnection.open should become

cassandraClient = new Cassandra.Client(new TBinaryProtocol.Factory().getProtocol(transport));

Here is the stack trace for reference.

java.lang.NoSuchMethodError: org.apache.cassandra.thrift.TBinaryProtocol: method <init>(Lorg/apache/thrift/transport/TTransport;)V not found
at com.netflix.astyanax.thrift.ThriftSyncConnectionFactoryImpl$ThriftConnection.open(ThriftSyncConnectionFactoryImpl.java:195)
at com.netflix.astyanax.thrift.ThriftSyncConnectionFactoryImpl$ThriftConnection$1.run(ThriftSyncConnectionFactoryImpl.java:232)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
@lakshmi-kannan
Copy link

This is breaking our builds too. For now, we are forcing a dependency less than 1.2.6. The PR from @tsachev seems reasonable. Could you review & merge this, please?

@elandau
Copy link
Contributor

elandau commented Jul 9, 2013

Any particular reason you need 1.2.6 on the client? Cassandra jars are being pulled in for convenience so astyanax won't need to implement things already in the cassandra code (such as partitioner). You can actually run a client with Cassandra 1.1 jars against a server running Cassandra 1.2.

@lakshmi-kannan
Copy link

@elandau: At least in our case, we just depend on Astyanax 1.56.32 alone (which in turn has dependency on org.apache.cassandra 1.2+).
http://mvnrepository.com/artifact/com.netflix.astyanax/astyanax-cassandra/1.56.32

Our server is running Cassandra 1.0.8 (we are in the process of upgrading). Our tests fail because astyanax client wouldn't connect to cassandra (stack trace same as above). So we now force version 1.2.5 for cassandra. It would be nice not to do that. I hope it gives you a little more context.

@tsachev
Copy link
Contributor Author

tsachev commented Jul 11, 2013

Also I am planning to run tests for my queries which will run EmbeddedCassandra. Having different versions for client and server in this case (if at all possible) will be a lot of pain.
And yes of course I prefer to run the tests against the actual Cassandra version used. Which in my case (early stage of development) is the latest one.

@lakshmi-kannan
Copy link

@elandau: Any updates?

opuneet added a commit that referenced this issue Aug 1, 2013
@opuneet
Copy link
Contributor

opuneet commented Aug 1, 2013

Merged in PR. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants