gpt4 book ai didi

java - "Unexpected end-of-input in VALUE_STRING"错误可能是什么原因

转载 作者:行者123 更新时间:2023-12-02 08:57:38 28 4
gpt4 key购买 nike

我开发了一个软件,它运行正常,直到我的 mysql 服务器崩溃。崩溃后,我格式化了我的服务器,然后安装了我需要的一切,就像过去的美好时光一样。格式化后,所有软件似乎运行正常,但我开发的软件开始出现一些错误。我在数据库中的一些列是 JSON。通常我从该列获取所有信息,修改它然后恢复它。不幸的是,格式化后我收到此错误:

2020-02-25 14:04:25.947  WARN 12528 --- [io-8443-exec-10] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unexpected end-of-input in VALUE_STRING; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Unexpected end-of-input in VALUE_STRING at [Source: (PushbackInputStream); line: 1, column: 15939] (through reference chain: com.bWS.entity.kk.MyEntity["hatalar"])]

我没有对软件进行任何更改,因此我的 JSON 数据不可能无效。此外,此错误是随机出现的,我的意思是,例如,在第一次尝试中会出现此错误,但第二次尝试一切都很好。特别是当数据长度变长时,该错误出现的频率会更高。

我需要帮助来了解原因。

谢谢大家。

系统:

  • Ubuntu 18.04
  • MySQL 8.0.19(我也尝试过 5.7)
  • OpenJDK 11.0.6
  • Tomcat 9

软件:Java/Spring Web应用程序(客户端+Web服务)

编辑

示例数据:

{
"id": 824,
"gId": 4904,
"eK": "https://algoritimbilisim.com",
"tarih": "2020-02-25",
"hatalar": {
"periyot": [
{
"aralik": "10:00-11:00",
"adi": [
{
"deger": "YOK",
"kalite": "1",
"hataKodlari": []
},
{
"deger": "YOK",
"kalite": "1",
"hataKodlari": []
}
]
}
]
}
}

最佳答案

既然你提到使用Tomcat 9,尝试分享我最近的经验。

最近我遇到了类似的问题。当升级到 Tomcat 9.0.31 时,我的一个测试用例执行大型 JSON(略小于 2 MB)的 POST 开始随机失败:

JSON parse error: Unexpected end-of-input in VALUE_STRING; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Unexpected end-of-input in VALUE_STRING at [Source: (PushbackInputStream); line: 1, column: 17] (through reference chain: com.abc.xyz ["str"]) - JSON parse error: Unexpected end-of-input in VALUE_STRING; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Unexpected end-of-input in VALUE_STRING at [Source: (PushbackInputStream); line: 1, column: 17] (through reference chain: com.abc.xyz["str"]) at

事实证明,Tomcat 9.0.31 中的一个错误导致了此问题。

https://bz.apache.org/bugzilla/show_bug.cgi?id=64202

迁移到 Tomcat 9.0.33 解决了我的问题。

您也在使用 Tomcat 9.0.31 吗?

关于java - "Unexpected end-of-input in VALUE_STRING"错误可能是什么原因,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60393743/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com