“VALUE_STRING 中的意外输入结束"可能是什么原因?错误 [英] What may be the reason of "Unexpected end-of-input in VALUE_STRING" error

查看:143
本文介绍了“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": "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,就试着分享我最近的经验.

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.

https://bz.apache.org/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_STRING 中的意外输入结束"可能是什么原因?错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆