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.webservice.net.model.GetAffairNewsListResponse["list"]->com.webservice.net.model.AffairNewsList["publishTime"]); 

nested exception is org.codehaus.jackson.map.JsonMappingException: 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.webservice.net.model.GetAffairNewsListResponse["list"]->com.webservice.net.model.AffairNewsList["publishTime"])

遇到这样的错误,主要是服务器数据和客户端数据类型不一致,这里遇到的publishTime数据类型,服务器是datetime型,而我客户端数据是String型,就会导致这样的错误,调成一致即可。

原文地址:https://www.cnblogs.com/EasonJim/p/8275383.html

时间: 2024-10-11 11:55:20

Jackson错误:Can not deserialize instance of java.lang.String out of START_OBJECT token的相关文章

解决用户自生成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

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": "C

Android错误笔记:Invalid layout of java.lang.String at value

Invalid layout of java.lang.String at value## A fatal error has been detected by the Java Runtime Environment:##  Internal Error (javaClasses.cpp:124), pid=9696, tid=9948#  fatal error: Invalid layout of preloaded class## JRE version:  (8.0_11-b12) (

当写listview的onItemClick的方法时写Toast的参数context写成this出现can't resolve method ’make text(OnClickListener,java.lang.String,int)'的错误,原因

listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Fruit fruit = fruitList.get(position); //Toast.makeText(this,fruit.getName(),Toast.L

groovy --不注意的小错误(java.lang.String.positive() is applicable)

sql 语句拼接报错: No signature of method: java.lang.String.positive() is applicable for argument types: () values: [] 原因:字符串相加时,加号前后有空格 例如(这样是不行的): sql =+ "and c.efficientStatus = "+courseStatus //错误 要把加号后面的空格去掉就行了,简直了. 新手的学习笔记:这是自己学习过程中的记录,方便自己回顾,好记性

java.lang.ClassCastException: java.lang.String cannot be cast to com.jy.hfims.domain 映射实体类型错误

今天在做 excel导出的时候,出现了一个问题"java.lang.ClassCastException: java.lang.String cannot be cast to com.domain.xxx": 公司用hibernate,查询时候可以用sql和hql,用什么一般看心情,第一次查询用的是select g.* from persion g ,site s where g.wz=s.dz(当然都是简写); 当get实体导出的 时候出现了" java.lang.Cla

mybaits错误解决:There is no getter for property named &#39;id&#39; in class &#39;java.lang.String&#39;(转)

在使用mybaitis传参数的时候,如果仅传入一个类型为String的参数,那么在 xml文件中应该使用_parameter来代替参数名. 正确的写法: [html] view plain <span style="font-size:18px;">    <!-- 用于查询运单号是否存在 --> <select id="isCargoBillNoExist" resultType="java.lang.Integer&quo

mybaits错误解决:There is no getter for property named &#39;id&#39; in class &#39;java.lang.String&#39;

在使用mybaitis传参数的时候,如果仅传入一个类型为String的参数,那么在 xml文件中应该使用_parameter 来代替参数名. 正确的写法: [html] view plaincopyprint? <span style="font-size:18px;">    <!-- 用于查询运单号是否存在 --> <select id="isCargoBillNoExist" resultType="java.lang.

错误解决:There is no getter for property named &#39;id&#39; in class &#39;java.lang.String&#39;

使用mybatis传入参数,如果在mappin.xml中使用<if>标签判断该参数是否为空,通常会报以上异常,解决方法:?在接口中该方法的参数前加上@Param("参数名")注解,即可? 错误解决:There is no getter for property named 'id' in class 'java.lang.String' 原文地址:https://www.cnblogs.com/lqh969696/p/11578492.html