MATLAB unable to connect with Cassandra

Viewed 35

We have a cassandra cluster up and running in test environment. The cluster is reach able through command line, however MATLAB is unable to connect.

Connection string:-

contactPoints = "172.31.61.211"; conn = cassandra(contactPoints) cassandra with properties:

               Cluster: "RQ_1"
         HostAddresses: "172.31.61.211"
       LocalDataCenter: "DC_1"
             Keyspaces: ["dse_insights"]

Error Message:-

Error using cassandra (line 130) Java exception occurred: java.lang.NoSuchMethodError: com.google.common.base.Objects.firstNonNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; at com.datastax.driver.core.policies.Policies$Builder.build(Policies.java:285) at com.datastax.driver.core.Cluster$Builder.getConfiguration(Cluster.java:1246) at com.datastax.driver.core.Cluster.(Cluster.java:116) at com.datastax.driver.core.Cluster.buildFrom(Cluster.java:181) at com.datastax.driver.core.Cluster$Builder.build(Cluster.java:1264) at com.mathworks.toolbox.cassandra.CassandraConnection.(CassandraConnection.java:43)

1 Answers

For me it looks like conflict between library version used by math plab and Cassandra Java driver. Specifically between guava versions - either mathlab uses older or newer version that conflicts with the driver.

Also, mathlab docs recommends to switch to new integration based on C++ driver (doc)

Related