当前位置:网站首页>Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance
2022-06-28 05:49:00 【zhou_zhao_xu】
错误信息:
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `com.aliyun.bizworks.centers.user.businessdomain.identification.protocols.oidc.model.OidcProtocolAccessToken` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: (byte[])"["com.aliyun.bizworks.centers.user.businessdomain.identification.protocols.oidc.model.OidcProtocolAccessToken",{"accessToken":"69O76SX7USMU","scope":"openid all","issuedAt":1653546793173,"expiresIn":6000}]"; line: 1, column: 113]
错误解析:

@Data
@Builder
public class OidcProtocolAccessToken {
private String accessToken;
private String scope;
private Long issuedAt;
private Long expiresIn;
}
无法构造实例,没有默认构建函数,查看实体,只提供了@Data
和@Builder,没有默认的构造器
单独使用@Data注解,生成无参数构造方法。
单独使用@Builder注解,生成了全属性的构造方法。
@Data + @Builder注解:没有了默认的无参构造方法。即使手动添加无参数构造方法或者只用@NoArgsConstructor注解都会报错
解决办法:
同时添加@AllArgsConstructor和@NoArgsConstructor注解
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class OidcProtocolAccessToken {
private String accessToken;
private String scope;
private Long issuedAt;
private Long expiresIn;
}
边栏推荐
- Enum
- JSP connecting Oracle to realize login and registration
- How to develop the language pack in the one-to-one video chat source code
- Data middle office: construction ideas and implementation experience of data governance
- 简单手写debounce函数
- Pre training model parameter mismatch
- 数据仓库:分层设计详解
- What is the e-commerce conversion rate so abstract?
- RL 实践(0)—— 及第平台辛丑年冬赛季【Rule-based policy】
- 独立站卖家都在用的五大电子邮件营销技巧,你知道吗?
猜你喜欢

Data middle office: six questions data middle office

sklearn 特征工程(总结)

JSP connecting Oracle to realize login and registration

Solution of dam safety automatic monitoring system for medium and small reservoirs

Qtcanpool knowledge 07:ribbon

阴阳师页面

一看就会 MotionLayout使用的几种方式

联想混合云Lenovo xCloud,新企业IT服务门户

Yin Yang master page

線條動畫
随机推荐
Solution of dam safety automatic monitoring system for medium and small reservoirs
Office is being updated and the application cannot start normally
numpy.reshape, numpy.transpose的理解
ipvs 导致syn 重传问题
Flink window mechanism (two waits and the last explanation)
What is webrtc?
YYGH-8-预约挂号
V4L2 驱动层分析
使用pytorch和tensorflow计算分类模型的混淆矩阵
Binder interview: memory management unit
Zzuli:1071 decomposing prime factor
全球国家(和地区)信息JSON数据
Maskrcnn, fast RCNN, fast RCNN excellent video
Qtcanpool knowledge 07:ribbon
Filecoin黑客松开发者大赛
What is the e-commerce conversion rate so abstract?
Zzuli:1072 frog climbing well
PKG package node project (express)
Mysql-16-subquery
How to add live chat in your Shopify store?