Could not read document: Can not deserialize instance of java.lang.String out of START_ARRAY

线上问题:

{
    "timestamp": "1544510665",
    "status": 400,
    "error": "Bad Request",
    "exception": "org.springframework.http.converter.HttpMessageNotReadableException",
    "message": "Could not read document: Can not deserialize instance of java.lang.String out of START_ARRAY token\n at [Source: [email protected]; line: 18, column: 18] (through reference chain: com.imdada.shine.dao.vo.SenderVo[\"poiAddress\"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String out of START_ARRAY token\n at [Source: [email protected]; line: 18, column: 18] (through reference chain: com.imdada.shine.dao.vo.SenderVo[\"poiAddress\"])",
    "path": "/toc/corp/client/addSender"
}

解决方案:    发现是在解析json字符串的时候,某个字段的值本来应该是字符串,结果是[开头的

原文地址:https://www.cnblogs.com/pengfei860/p/10102895.html

时间: 2024-08-30 17:45:34

Could not read document: Can not deserialize instance of java.lang.String out of START_ARRAY的相关文章

解决用户自生成meta导入kylin后报错问题Can not deserialize instance of java.lang.String[] out of VALUE_STRING token

报错栈: 2017-06-22 20:48:07,101 ERROR [http-bio-7070-exec-5] cube.CubeManager:947 : Error during load cube instance, skipping : /cube/energon_dm_admission_record_fact_01.json java.lang.IllegalStateException: Failed to init CubeDescManager from [email pr

Jackson错误:Can not deserialize instance of java.lang.String out of START_OBJECT token

org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: Can not deserialize instance of java.lang.String out of START_OBJECT token at [Source: [email protected]; line: 1, column: 112] (through reference chain: com.web

SpringMVC接口测试异常:Can not deserialize instance of int out of START_OBJECT token

之前使用springmvc搭建了restful风格的接口服务,在使用mockmvc进行集成测试的时候出现了异常:Can not deserialize instance of int out of START_OBJECT token.为什么会出现这个问题?怎么解决这个问题呢?接下来本文详细分析讲解这个问题. 一.问题展现 接口代码 @ResponseBody @RequestMapping(value = "/m1", method = RequestMethod.POST) @Ap

JSON parse error: Cannot deserialize instance of `int` out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.exc

代码程序: @PostMapping("selectById") @ResponseBody public Result selectById(@RequestBody int id) { Result result =new Result(); List<User> list = userService.selectById(id); if(list.size()==1){ result.setCode("000"); result.setMsg(&q

java.lang.IllegalArgumentException: Document base E:\Eclipse\workspace\.metadata\.plugins\org.eclips

1.错误描述 四月 13, 2015 5:56:55 下午 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Java\jdk1.7.0_67\bi

严重: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener java.lang.IllegalStateException

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext re

Java.lang.NoSuchFieldError: INSTANCE异常

解决方案: java.lang.NoSuchFieldError: INSTANCE异常. 1.jar包重复了. 2.版本还不相同,如果包的版本不同也会报相应的错,不过一般情况自己导入的jar包主要看导入有没有共同范围下有重复的jar. 仅供参考,大神高论,评论下方. Java.lang.NoSuchFieldError: INSTANCE异常

java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already.

java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [META-INF/services/javax.xml.bind.JAXBContext]. 解决方法:先将项目remove,然后停止服务器,到应用程序目录下将部署的应用删除,然后启动服务器,重新部署就ok了 原因:暂不明确,可能是修改后有原来的残留物.

type parameters of &lt;T&gt;T cannot be determined; no unique maximal instance exists for type variable T with upper bounds int,java.lang.Object

今天在进行代码检查的时候出现下面的异常: 1 type parameters of <T>T cannot be determined; no unique maximal instance exists for type variable T with upper bounds int,java.lang.Object 当时的第一感觉就是代码因为jdk版本太低引起的. 因为最后咨询了配置管理组的同事,确实发现是因为我本地jdk用的是1.7版本,而代码检查机器上用的是jdk1.6版本.因此出现