i want to do a connection with Cassandra with java class.But its not working .Here is my code ..
import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.Row;
import com.datastax.driver.core.Session;
class CassandraConnection {
public static void main(String[] args) {
String serverIp = "166.78.10.41";
String keyspace = "gamma";
CassandraConnection connection;
Cluster cluster = Cluster.builder()
.addContactPoints(serverIp)
.build();
Session session = cluster.connect(keyspace);
String cqlStatement = "SELECT * FROM TestCF";
for (Row row : session.execute(cqlStatement)) {
System.out.println(row.toString());
}
}
}
this is the error log..
BUILD FAILURE
Total time: 0.883s Finished at: Wed Jun 05 15:54:02 IST 2013
Final Memory: 4M/15M
Failed to execute goal on project CassandraConnection: Could not resolve dependencies for project com.mycompany:CassandraConnection:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: com.datastax.cassandra:cassandra-driver-parent:jar:1.0.0, org.specs2:scalaz-effect_2.11.0-SNAPSHOT:jar:7.0.1-SNAPSHOT, org.scalaz:scalaz-effect_2.9.3:jar:7.1.0-SNAPSHOT: Failure to find com.datastax.cassandra:cassandra-driver-parent:jar:1.0.0 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException