Search code examples
scalaplayframeworkcassandra

how to connect to cassandra through scala in play framework


The answer i'm seeking is the dependencies which i'll be needing to connect to cassandra through play-scala. cassandra version 2.2.0, play version-2.4

my build.sbt file:

name := """basic-form"""

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayScala)

scalaVersion := "2.11.6"
libraryDependencies ++= Seq(   
"com.typesafe.akka"      %% "akka-actor"            % "2.2.0",   "com.typesafe.akka"      %% "akka-slf4j"            % "2.2.0","com.datastax.cassandra"  % "cassandra-driver-core" % "2.0.2")

On importing "com.datastax.driver.core.Cluster" error comes that datastax is not member of com

suggestions would be appreciated.


Solution

  • The official DataStax Java Driver for Cassandra is available at https://datastax.github.io/java-driver/. You won't need anything more than importing the dependency in your SBT build, and reading the documentation to get started.