I am unable to connect to Cassandra DB. I have tried with port number 9042 but it is throwing an exception given below
java.sql.SQLNonTransientConnectionException: org.apache.thrift.transport.TTransportException: Read a negative frame size (-2097152000)!.
Due to that I am using port number 9160 for the same. But it is giving me below exception
[main] ERROR org.bigsql.cassandra2.jdbc.CassandraConnection - Impossible to connect to server Server Name : org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection timed out: connect
Please provide the solution on the same. Please see below code that I am using for connection.
URL="jdbc:cassandra://server name:9160/schema";
address =address;
user=Username;
pass=Password;
Class.forName("org.bigsql.cassandra2.jdbc.CassandraDriver");
conn = DriverManager.getConnection(URL,user,pass);