“VALUE

编程入门 行业动态 更新时间:2024-10-18 10:16:50
本文介绍了“VALUE_STRING 中的意外输入结束"可能是什么原因?错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

I developed a software and it was running properly until my mysql server crashed. After crash, I formatted my server, then installed everything I needed same as good old days. After formatting all softwares seems running properly, but the software I developed started to give some errors. Some of my columns in database are JSON. Normally I get all information from that column, modify it then restore it. Unfortunately after formatting I get this error:

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 数据不可能无效.此外,此错误随机出现,我的意思是例如在第一次尝试时出现此错误,但第二次尝试一切正常.特别是当数据长度变长时,这个错误出现的频率更高.

I didn't change anything from software, so it is not possible that my JSON data is invalid. In addition this error appears randomly, I mean for example in first try this error appears but second try everything works great. Especially if data length become longer, this error appears more frequently.

我需要帮助来了解原因.

I need help to understand what the reason is.

谢谢大家.

系统:

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

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

The Softwares: Java/Spring web applications(Client+Web Service)

编辑

示例数据:

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

推荐答案

既然你提到使用 Tomcat 9,就试着分享我最近的经验.

Since you mentioned using Tomcat 9, attempting to share my recent experience.

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

Recently I ran into similar issue. When upgraded to Tomcat 9.0.31, one of my test case which does a POST of a large JSON (little less than 2 MB) started failing randomly with:

JSON 解析错误:VALUE_STRING 中出现意外的输入结束;嵌套异常是 com.fasterxml.jackson.databind.JsonMappingException: Unexpected end-of-input in VALUE_STRING at [Source: (PushbackInputStream);行:1,列:17](通过参考链:com.abc.xyz ["str"]) - JSON 解析错误:VALUE_STRING 中的意外输入结束;嵌套异常是 com.fasterxml.jackson.databind.JsonMappingException: Unexpected end-of-input in VALUE_STRING at [Source: (PushbackInputStream);行:1,列:17](通过参考链: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"]) - 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 中存在导致此问题的错误.

Turns out that there was a bug in Tomcat 9.0.31 which caused this.

bz.apache/bugzilla/show_bug.cgi?id=64202

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

Moving to Tomcat 9.0.33 solved my issue.

您是否也在使用 Tomcat 9.0.31?

Are you also using Tomcat 9.0.31?

更多推荐

“VALUE

本文发布于:2023-11-28 07:06:42,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1641409.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!