1
votes

I created a KEYSPACE using cassandra cql3 and am trying to connect to the same using Cassandra jdbc driver. When I try to do so I get the error:

java.sql.SQLSyntaxErrorException: InvalidRequestException(why:Keyspace MYKEYSPACE does not exist) at org.apache.cassandra.cql.jdbc.CassandraConnection.(CassandraConnection.java:139) at org.apache.cassandra.cql.jdbc.CassandraDriver.connect(CassandraDriver.java:92) at java.sql.DriverManager.getConnection(DriverManager.java:582) at java.sql.DriverManager.getConnection(DriverManager.java:207)

The connection string is: jdbc:cassandra://localhost:9160/MYKEYSPACE ?version=3.0.0

I can connect and check that the keyspace exists from command line. (cqlsh -3 localhost 9160); use KEYSPACE MYKEYSPACE

Any ideas?

1

1 Answers

3
votes

My guess: JDBC is being case-sensitive. Try lowercase.