Search code examples
playframework-2.0cassandracrudkundera

Connection and CRUD operation over kundera Cassandra and Play framework


I am trying to connect Cassandra 1.1.9 over Kundera with Play 2.0 framework. I tried the example Getting-Started-in-5-minutes on GitHub. But I got this exception:


[PersistenceLoaderException: com.impetus.kundera.utils.InvalidConfigurationException: Duplicate persistence-units for name: cassandra_pu. verify your persistence.xml file]

I just added kundera-cassandra-2.2.1-jar-with-dependencies.jar to project build path. Should I add anything to application.conf?


Solution

  • Another option is PlayOrm for cassandra with the playframework which has it's own in-memory nosql which is usually how playframework is used in development for speed of coding and no server restarts ;) (and it keeps that data as you change your code just like the in-memory RDBMS options give you. There is also a 1.2.x playframework plugin too since the 1.2.x version is way way more productive if you are in java(in scala, it is probably just as slow to develop in because of the slowness of the scala compiler....I am hoping they get that faster and faster as I did love scala).

    Dean