A simple CRUD application in Play! Framework using Kundera and Cassandra as a Database.

playing-kundera-cassandra: This is a classic CRUD application, backed by Play 2.3.0, Kundera & Cassandra. It demonstrates:

  • Accessing a Cassandra database, using Kundera.
  • Achieving, Futures to use more idiomatic error handling.
  • Accessing JS & CSS libraries by WebJars.
  • Bootswatch-United with Twitter Bootstrap 3.1.1 to improve the look and feel of the application

Instructions :-


  • The Github code for the project is at : playing-kundera-cassandra
  • Clone the project into local system
  • To run the Play framework 2.3.0, you need JDK 6 or later
  • Install Typesafe Activator if you do not have it already. You can get it from here: download
  • Install Cassandra if you do not have it already. Instructions
  • Start Cassandra Server and create schema/tables
[default@unknown] create keyspace EmployeeExample;
395c9500-bf8d-3985-95a2-ddc055090131
[default@unknown] use EmployeeExample;
Authenticated to keyspace: EmployeeExample
[default@EmployeeExample] create column family employees with comparator=UTF8Type and default_validation_class=UTF8Type and key_validation_class=UTF8Type;
840d66b1-a54a-329e-9a43-dc9f373e9386
  • Execute activator clean compile to build the product
  • Execute activator start to execute the product
  • playing-kundera-cassandra should now be accessible at localhost:9000

References :-


This is the start, from next week onwards we would be working on this application to make it grow. We would look at how we can make it more functional, then we would be adding more modules to it together. If you have any changes then feel free to send in pull requests and we would do the merges 🙂 Stay tuned.

5 thoughts on “A simple CRUD application in Play! Framework using Kundera and Cassandra as a Database.

  1. Wholy Moses!
    Congratulations, you managed to copy the Java bloatware architecture we all love to hate and the reason for leaving java and use Scala.

    In this ‘Simple CRUD application’ you describe one single database entity Employee in at least 7 classes;
    models.domain.Employee
    models.domain.EmployeeForm
    models.process.EmployeDAO
    models.process.EmployeeDAOImpl
    models.process.EmployeeProcess
    models.process.EmployeeProcessImpl (class)
    models.process.EmployeeProcessImpl (obj)
    ( I might have missed a few)

    That’s a really good job of migrating java bloatware design to Scala.
    Imagine now a more realistic world case example with a database consisting of 120 tables. That will be about 840 classes.

    1. it is because of DI, we got into multiple scala classes. Definitely it can be done in couple of scala classes. This is what i will be posting another blog post to address this problem.

  2. Hi ,
    I am facing an issue as the entities are not available at run time , it won’t be loaded as entity.

    Any suggestions , i tried to bundle them in a jar and kept under root folder , But i still face the same exception.

  3. Hello,
    I am using Play! 2.4.6 framework and Cassandra 2.2 database. I want to integrate with Cassandra database, I have gone through several examples on internet including this one as well. But none of them were helpful to me for connecting a Play! with Scala application with Cassandra. I am getting error for javax.persistence. Because of which at runtime it shows the error in routes file. I just want simple steps for connecting my Play! for Scala application with Cassandra database. My Play! framework version is 2.4.6. What steps should be performed so as to include Kundera’s dependency in my project, and also adding the javax.persistence dependency as well ?

Leave a Reply

%d bloggers like this: