0

I have created a cluster called test with three nodes in my machine using ccm (All the nodes are UP). I want to access the cluster using Java API.

However, I get the error below:

All host(s) tried for query failed (tried: /127.0.0.1:9042(com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured table schema_keyspaces)

Cassandra version : 3.11.4

cassandra driver core : 2.1.9

Part of my code :

public static void main(String args[])
{
     //creating Cluster object
     Cluster cluster = Cluster.builder().addContactPoint("127.0.0.1").build();

     //Creating Session object
     Session session = cluster.connect();
}

Anyway to resolve this?

1

2 Answers 2

1

Apparently schema_keyspaces isnt available in the specified cassandra version. I suggest to utilize the latest cassandra drivers , since that it is compatibility issue.

Sign up to request clarification or add additional context in comments.

Comments

0

Version 2.1 of the Cassandra Java driver is not compatible with Apache Cassandra 3.11 (see the Compatibility Matrix).

You will need to upgrade to at least Java driver v3.0 to connect to a Cassandra 3.11 cluster. Cheers!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.