【发布时间】:2018-08-23 14:48:22
【问题描述】:
春季版:4.3.14 Spring Data cassandra 版本:1.5.10
嗨, 我正在使用 Spring Data Cassandra,并且我有以下域对象
@table
Public class Ticket {
String tickernum;
String ticketName;
List<Subscriber> subscriber;
}
@UserDefinedType()
public class subscriber {
String imsi;
String msisdn;
String name;
}
在我的 cassandra 数据库中,我将订阅者定义为 UDT(用户定义类型)。
我正在尝试使用 Ticket 有效负载发出发布请求以“创建票证”
但是,我收到以下错误:
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)
有谁知道如何解决这个问题?
【问题讨论】:
-
你试过添加空构造函数吗?
标签: spring cassandra user-defined-types