0

Spring version: 4.3.14 Spring data cassandra version:1.5.10

Hi, I am using Spring Data Cassandra and I have the following domain object

@table
Public class Ticket {
   String tickernum;
   String ticketName;
   List<Subscriber> subscriber;

}


@UserDefinedType()
public class subscriber {
  String imsi;
  String msisdn;
  String name;
}

In my cassandra database, I have defined the subscriber to be UDT (user defined type).

I am trying to make a post request with the Ticket payload to "create a ticket"

However, I am getting the following error:

12:15:21,259  WARN DefaultHandlerExceptionResolver:384 - Failed to read HTTP message: org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot construct instance of `com.datastax.driver.core.UDTValue` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator); nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `com.datastax.driver.core.UDTValue` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)

does anyone know how to resolve this?

1
  • Have you tried to add empty constructor?
    – Alex Ott
    Commented Dec 15, 2018 at 18:26

1 Answer 1

1

Try @UserDefinedType (without parenthesis) for the subscriber UDT

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.