Reputation: 23
I'm new in Cassandra and can't establish connection. I think I don't have the right version and that's why I'm having this error message. Can someone tell me what version should I use. I'm currently using:
Cassandra Version: cqlsh 5.0.1 | Cassandra 3.11.10 | CQL spec 3.4.4 | Native protocol v4
Tomcat Version: 9.0.50
JRE Version: jre1.8.0_181
Upvotes: 1
Views: 1171
Reputation: 16313
InvalidQueryException
is typically returned when running a query with a valid CQL syntax but the query itself is invalid.
But in your case where it's reporting an issue with schema_keyspaces
, it is usually caused by using an older version of the Java driver connecting to a late-release Cassandra version.
If you're building a new app, we recommend that you use the latest version in the Java driver 4.x series. At the time of writing, the latest release is 4.13.
As a side note if you're just learning how to build apps for Cassandra, I recommend using Astra DB. You can launch a Cassandra cluster in just a few clicks and there's a free tier with no credit card required.
Astra DB also has Stargate.io already bundled in and pre-configured so you can connect to Cassandra using REST API, GraphQL API and JSON/Doc API. If you're interested, we have free hands-on interactive tutorials on Cassandra, Stargate and how to build apps at datastax.com/dev. Cheers!
Upvotes: 1