I'm trying to connect to cassandra from java using the now recommended datastax java driver 3.0 but I get the exception
Caused by: java.lang.IllegalStateException: Detected Guava issue #1635 which indicates that a version of Guava less than 16.01 is in use. This introduces codec resolution issues and potentially other incompatibility issues in the driver. Please upgrade to Guava 16.01 or later.
at com.datastax.driver.core.SanityChecks.checkGuava(SanityChecks.java:62)
at com.datastax.driver.core.SanityChecks.check(SanityChecks.java:36)
at com.datastax.driver.core.Cluster.<clinit>(Cluster.java:67)
I have downloaded the zip file and compiled with maven mvn clean package -Dskiptests
Inside the target folder for the core driver I found a jar named java-driver-3.0/cassandra-driver-core-3.0.1-SNAPSHOT-shaded.jar which I added to my projects libraries.
Trying to run the project gives the above exception.
Trying to connect to cluster as below
private static Cluster CLUSTER;
private static Session SESSION;
public static Cluster createCluster() {
CLUSTER = Cluster.builder().addContactPoint("127.0.0.1").build();
SESSION = CLUSTER.connect();
ResultSet rs = SESSION.execute("select release_version from system.local");
Row row = rs.one();
System.out.println(row.getString("relese_version"));
return CLUSTER;
}
public static Cluster getCluster() {
if (null == CLUSTER) {
CLUSTER = createCluster();
}
return CLUSTER;
}
I suspect the solution is here but I don't know what I am supposed to do with that XML. I am relatively a greenhorn in Maven please go easy on me. Finally, does Hector client have support for Cassandra 3.x cause if I can't resolve the above issue I wouldn't mind using hector.