-
Notifications
You must be signed in to change notification settings - Fork 502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] com.alibaba.fastjson2.JSONException: input not end, offset 65, character :, line 1, column 65, fastjson-version 2.0.53 开发环境好使,打成jar包咋也不行 #3190
Comments
redis 序列化配置
} |
本地开发环境没有问题,打成jar包,无论测试环境还是生产环境,都会报错:com.alibaba.fastjson2.JSONException: input not end, offset 65, character :, line 1, column 65, fastjson-version 2.0.53 {"@type":"com.fengjun.finance.vo.EnterpriseVO","archivingStatus":1,"businessType":1,"children":[],"completionStatus":1,"enterpriseAbbreviationName":"孚日集团","enterpriseCity":"","enterpriseId":"254198923769507840","enterpriseName":"孚日集团股份有限公司","enterpriseProvince":"","enterpriseType":1,"mnemonicCode":"","parentId":"0","periodWhichBelongsEnd":"2024-12-31","periodWhichBelongsStart":"2024-01-01","reportDate":"2024-12-31","signatureAnnotator":"杨文远","taxpayerIdentificationNumber":"91370700165840155D","users":[{"@type":"com.fengjun.finance.vo.UserVO","mobile":"17611030000","nickName":"杨文远","userId":"2","userName":"17611030000"}]} |
希望有一个临时的解决方案,突然发现了这个问题,也不知道是因为啥。。 |
是不是A类型写进去,使用B类型读取了? |
1 similar comment
还有就是 打成jar包,扔服务器上,CompletableFuture内会报错,开发环境 不会有问题。 |
我怀疑是虚拟线程的情况下,ThreadLocal的数据重用出问题了 |
问题描述
com.alibaba.fastjson2.JSONException: input not end, offset 65, character :, line 1, column 65, fastjson-version 2.0.53
环境信息
spring boot 3.3.4、jdk21、redis7.2.5
重现步骤
如何操作可以重现该问题:
传相同的ID,期间数据在redis里面没有任何改动,从redis里面查询,不同的调用方法 就会报错。
public Enterprise getEnterpriseByEnterpriseId(Long id) throws RuntimeException {
EnterpriseVO enterpriseVO = (EnterpriseVO) redisTemplate.opsForHash().get(RedisKeyConstant.REDIS_KEY_ENTERPRISE_ALL, String.valueOf(id));
if (enterpriseVO != null) {
return EnterpriseVO.convertToVO(enterpriseVO);
}
//可在此输入示例代码
期待的正确结果
对您期望发生的结果进行清晰简洁的描述。
相关日志输出
请复制并粘贴任何相关的日志输出。
附加信息
如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。
The text was updated successfully, but these errors were encountered: