"Unexpected end-of-input in VALUE_STRING" 错误可能是什么原因
What may be the reason of "Unexpected end-of-input in VALUE_STRING" error
我开发了一个软件,在我的 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 网络应用程序(客户端+网络服务)
编辑
示例数据:
{
"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": []
}
]
}
]
}
}
既然你提到使用Tomcat9,尝试分享我最近的经验。
最近我 运行 遇到了类似的问题。当升级到 Tomcat 9.0.31 时,我的一个测试用例执行 POST 大 JSON(略小于 2 MB)开始失败 运行domly 与:
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?
我开发了一个软件,在我的 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 网络应用程序(客户端+网络服务)
编辑
示例数据:
{
"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": []
}
]
}
]
}
}
既然你提到使用Tomcat9,尝试分享我最近的经验。
最近我 运行 遇到了类似的问题。当升级到 Tomcat 9.0.31 时,我的一个测试用例执行 POST 大 JSON(略小于 2 MB)开始失败 运行domly 与:
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?