CodeHappy
CodeHappy

Reputation: 81

Cassandra Java query example

I'm an new to java and Cassandra and I am trying to write a simple java application and I want to query a table in a keyspace and return all rows. I get the following error from these lines of code below is how I am trying to connect to the Cassandra db. Nodetool status <keyspace> returns up and normal so I'm not sure what I am missing.

Code used:

Cluster cluster = Cluster.builder().addContactPoint("192.168.1.30").build();
Session session = cluster.connect(); 

Error:tried: /192.168.x.x:9042 (com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured table schema_keyspaces))

Upvotes: 1

Views: 589

Answers (1)

adutra
adutra

Reputation: 4526

The error you are seeing suggests that you are trying to connect to a Cassandra 3.0 cluster with an incompatible java driver version.

The only compatible driver version right now is 3.0.0-alpha5. 3.0.0-beta1 should be out shortly.

Upvotes: 2

Related Questions