fastjson 类型转换异常(Interger cast to Long)

bakd9h0s  于 2021-11-27  发布在  Java
关注(0)|答案(2)|浏览(432)

JSON 数据:
{"gaPic2ImsiAnalysis":{"id":13,"code":"","name":"","isRemoved":"0","version":3,"updateTime":"2019-01-16 16:57:52","createTime":"2019-01-15 19:53:24","createPersonId":4185716,"createPerson":"汕头试点","updatePersonId":2,"updatePerson":"admin","platformNo":"100000","ext1":"","ext2":"","ext3":"","ext4":"","ext5":"","ext6":"","ext7":"","ext8":"","ext9":"","ext10":"","ts1":"","ts2":"","ts3":"","ts4":"","ts5":"","d1":"","d2":"","d3":"","d4":"","d5":"","parentDocketId":"","taskName":"test11","caseId":"47","siteAll":1,"queryNumber":"100","similar":"80","startTime":"2018-12-18 00:00:00","endTime":"2019-01-16 23:59:59","relatedIds":"","removeIds":"1321009,1321009,1321009,1321009","faceId":"2380295"},"siteList":[{"siteId":120000,"siteName":"大连安检门测试"},{"siteId":45,"siteName":"五道口"},{"siteId":46,"siteName":"知春路"},{"siteId":47,"siteName":"中关村"},{"siteId":48,"siteName":"苏州街"},{"siteId":49,"siteName":"人民大学"},{"siteId":50,"siteName":"长春桥"},{"siteId":120001,"siteName":"长丰街"},{"siteId":120006,"siteName":"明珠花园西2门"},{"siteId":120010,"siteName":"明珠花园北门"},{"siteId":120012,"siteName":"明珠花园东门"},{"siteId":120013,"siteName":"明珠花园南门"},{"siteId":120015,"siteName":"京杭家苑F区北门"},{"siteId":120016,"siteName":"荷韵家园北门"},{"siteId":120017,"siteName":"荷韵家园北2门"},{"siteId":120018,"siteName":"京杭佳苑F区西门"},{"siteId":120020,"siteName":"明珠花园西1门"},{"siteId":120009,"siteName":"郑州演示"},{"siteId":120004,"siteName":"汇丰步行街街口"},{"siteId":120005,"siteName":"汇丰步行街街尾"},{"siteId":120021,"siteName":"华侨医院正门"},{"siteId":120022,"siteName":"华侨医院侧门"}]}

抛出异常:java.lang.Integer cannot be cast to java.lang.Long

备注:在本地调式时未出现此异常,部署到服务器上之后出现这个情况,JDK版本都是1.8

fastjson version:1.2.44

hfsqlsce

hfsqlsce1#

提供共完整堆栈信息

fsi0uk1n

fsi0uk1n2#

导致此异常的原因应该是基类里面的id是泛型类型,fastjson 可能在底层处理这个泛型时没有处理完善。

相关问题