Type definition error: [simple type, class java.time.Instant]; nested exception is com.fasterxml.jac
postman调用接口报错
“type”: “https://www.jhipster.tech/problem/problem-with-message”,
“title”: “Internal Server Error”,
“status”: 500,
“detail”: “Type definition error: [simple type, class java.time.Instant]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of java.time.Instant
(no Creators, like default construct, exist): no String-argument constructor/factory method to deserialize from String value (‘2020-03-19 11:02:58’)\n at [Source: (PushbackInputStream); line: 3, column: 18] (through reference chain: com.cplh.gis.service.dto.ProcessFlowDTO[“createdDate”])”,
“path”: “/api/processFlow”,
“message”: “error.http.500”
原因是实体类继承AbstractAuditingEntity审计功能,其中的createdDate和lastModifiedDate字段是Instant类型的,json对其进行序列化和反序列化会报错。
解决办法
在审计类的字段加上@JsonIgnore注解就解决了。
更新一下:::
还有一种情况:
实体类的DTO没有实现序列化,
Type definition error: [simple type, class java.time.Instant]; nested exception is com.fasterxml.jac相关推荐
- 开发BUG | “Type definition error: [simple type, class com.example.mall.pojo.User];
今天用postman测试接口的时候遇到了这个错误 "Type definition error: [simple type, class com.example.mall.pojo.User ...
- type definition error
type definition error 报错信息 "msg": "Type definition error: [simple type, class com.ynt ...
- Unknown integral data type for ids : java.lang.String; nested exception is org.hibernate.id.Identifi
1.发生的异常内容: org.springframework.orm.hibernate5.HibernateSystemException: Unknown integral data type f ...
- 通俗易懂解释一类和二类错误(Type I Error Type II Error)
通俗易懂解释一类和二类错误(Type I Error Type II Error) 作者 KULDEEP PATEL 翻译自False Positive (Type I Error) and Fals ...
- java nested_Java 里的 nested exception 如何理解?
经常看到,但是不理解什么意思 比如这个: 2017-10-20 11:38:11,211 ERROR - Failed to convert value of type 'java.lang.Stri ...
- jboss5 启动时报HsqlException:length must be specified in type definition:VARBINARY错误
https://community.jboss.org/message/585994 EJBTimerService error on JBoss5 start up - without applic ...
- JsonMappingException:找不到类型[simple type,class]的合适构造函数:无法从JSON对象实例化
本文翻译自:JsonMappingException: No suitable constructor found for type [simple type, class ]: can not in ...
- XML——文档类型定义(DTD-Document Type Definition)
[0]README 0.1)本文文字描述转自 core java volume 2 , 旨在理解 XML--文档类型定义(DTD-Document Type Definition) 的基础知识: 0. ...
- Json转对象失败:No suitable constructor found for type [simple type, class com.test.faster.domain.respons
今天自己定制一个json转换对象的方法,转换过程中报错: "No suitable constructor found for type [simple type, class com.te ...
最新文章
- 汪劲:生命系统中的非平衡物理学
- leetcode算法题--摆动序列★
- 中国工程院2019年院士增选第二轮候选人名单公布 李彦宏落选
- 一文搞定时间复杂度和空间复杂度
- Ajax系列之三:UpdatePanel
- 数据库设计(三)概念数据模型
- dicom格式怎么转换_QQ音乐下载的歌曲怎么转换MP3?音频转换格式详细教程
- codeforces1453 E. Dog Snacks
- Qt工作笔记-各种构造函数汇总以及运算符重载(入门必备)
- 选择合适的方法调试程序
- (八)用于人脸识别的Web API
- 清华镜像源_Hyperledger Fabric2.x Docker镜像编译加速
- CentOS + PyCharm 环境下使用 LIBSVM(及 unresolved reference 问题的解决)
- 商业智能BI有哪些数据价值
- [小甲鱼]汇编语言笔记 基础知识
- 1.2 几个经典博弈模型(囚徒的困境、赌胜博弈、产量决策的古诺模型)
- 【Windows】安装win10虚拟机
- 图片压缩工具ImageOptim
- 智和网管平台SugarNMS政府部门综合网管
- 程序员,你以为你很优秀,但却面试屡屡失败?
热门文章
- ddl语句(数据库ddl语句)
- [POJ1300]Door Man 做题笔记
- 随机生成数——C语言
- 火影忍者ol HTML5,火影忍者OL忍者考试50层全职业攻略
- oracle程序包写法,Oracle学习笔记20150913pl/sql编程包的写法
- ibatis.builder.BuilderException: Error parsing Mapper XML: Could not resolve type alias ‘XXX‘
- Linux CPU亲缘性详解
- 计算机专业实习的重要性
- 每个人背后都会有人在默默注视着你,所以很幸福
- 百度语音识别APP_ID/API_KEY/SECRET_KEY