I have this code:
private final String CONTACT_POINT = "127.0.0.1";
private SynchronizationTableManager()
{
cluster = Cluster.builder().addContactPoint(CONTACT_POINT).build();;
session = cluster.connect(KEYSPACE);
createTableIfNotExists();
}
I get the following exception:
All host(s) tried for query failed (tried: /127.0.0.1:9042 (com.datastax.driver.core.TransportException: [/127.0.0.1:9042] Cannot connect)) with stack trace: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /127.0.0.1:9042 (com.datastax.driver.core.TransportException: [/127.0.0.1:9042] Cannot connect))
This happens on the line calling cluster.connect(KEYSPACE)
. Any idea how to fix this?