0
CREATE TABLE data.banks (
    id text,
    codes frozen<map<text, text>>
 PRIMARY KEY (id,codes));

Added a corresponding model class with @Frozen("map<text, text>") anotation on codes field

Insert goes in properly but when i open cqlsh and run

select * from data.banks i get following error

Traceback (most recent call last):
  File "/usr/bin/cqlsh", line 1078, in perform_simple_statement
    rows = self.session.execute(statement, trace=self.tracing_enabled)
  File "/usr/share/cassandra/lib/cassandra-driver-internal-only-2.6.0c2.post.zip/cassandra-driver-2.6.0c2.post/cassandra/cluster.py", line 1594, in execute
    result = future.result(timeout)
  File "/usr/share/cassandra/lib/cassandra-driver-internal-only-2.6.0c2.post.zip/cassandra-driver-2.6.0c2.post/cassandra/cluster.py", line 3296, in result
    raise self._final_exception
error: unpack requires a string argument of length 4

One more problem is when i add a row with values ('1',{'code2':'435sdfd','code1':'2132sd'}). It shows one row inserted. But when I add another row with ('1',{'code2':'435sdfe','code1':'2132sd'}) . It throws TimedOut Exception.

Using cassandra 2.1.8 , cassandra-driver-mapping 2.1.8 , kundera-cassandra-pelops 3.0 version.

Prabhath
  • 629
  • 6
  • 13
  • I cannot reproduce either of your issues. My guess is that Kundera is doing something strange. Try using the ORM in the newer Java driver, instead of Kundera. – Aaron Dec 22 '15 at 16:06
  • Use `kundera-cassandra` (thrift client) instead of `kundera-cassandra-pelops`. Kundera, being JPA compliant, does not read `@Frozen` annotation and supports frozen on UDTs only (implicitly). Frozen on basic collections is not supported. There are naive work-arounds if you are interested. – karthik manchala Dec 23 '15 at 10:13

0 Answers0