Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

mysub99 avatar image
mysub99 asked

com.datastax.oss.driver.api.core.type.codec.CodecNotFoundException: Codec not found for requested operation: [DATE <-> com.datastax.driver.core.LocalDate]

I am facing issue with date datatype, following is my table schema

CREATE TABLE user (
    name text,
    id text,
    date date,
    division text,
    PRIMARY KEY ((name, id, date), name)

now my backend is spring boot with following library's

compile group: 'com.datastax.oss', name: 'java-driver-core', version: '4.9.0'
compile group: 'com.datastax.cassandra', name: 'cassandra-driver-extras', version: '3.10.2'
compile group: 'com.datastax.cassandra', name: 'cassandra-driver-mapping', version: '3.2.0'

i am converting LocalDate to cassandra LocalDate

def cassandraLocalDate = com.datastax.driver.core.LocalDate.fromYearMonthDay(today.year, today.monthValue, today.dayOfMonth)

but still getting this error

com.datastax.oss.driver.api.core.type.codec.CodecNotFoundException: Codec not found for requested operation: [DATE <-> com.datastax.driver.core.LocalDate]

don't know what am i doing wrong here. would highly appriciate any help with this.

Thanks & Regards


data modelingjava drivercodec
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

0 Answers