Failed to read HTTP message: org.springframework.http.converter.HttpMessageNotReadableException: Cou
2017-06-01 11:29
871 查看
var para={id:"",name:""}; $.ajax({ type:"post", url:/inmp/addUser, async:false, dataType:'json', contentType:'application/json;character:utf-8', data:JSON.stringify(para), success:function(value){ alert(value); if(value === 'success'){ }else{ alert("删除失败!"); } } });
错误原因:
没有写:
1、contentType:'application/json;character:utf-8', 2、JSON.stringify()
错误详情:
org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver handleHttpMessageNotReadable 警告: Failed to read HTTP message: org.springframework.http.converter.HttpMessageNotReadableException: Could not read document: Unrecognized token 'operatorname': was expecting ('true', 'false' or 'null') at [Source: java.io.PushbackInputStream@b33169a; line: 1, column: 14]; nested exception is com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'operatorname': was expecting ('true', 'false' or 'null') at [Source: java.io.PushbackInputStream@b33169a; line: 1, column: 14]
相关文章推荐
- Failed to read HTTP message: org.springframework.http.converter.HttpMessageNotReadableException: Cou
- Failed to write HTTP message: org.springframework.http.converter.HttpMessageNotWritableException: Co
- org.springframework.http.converter.HttpMessageNotReadableException: Could not read document:
- Crash-fix-2:org.springframework.http.converter.HttpMessageNotReadableException
- org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing
- org.springframework.http.converter.HttpMessageNotWritableException:
- Spring 4.x org.springframework.http.converter.json.MappingJacksonHttpMessageConverter ClassNotFoundException:
- org.springframework.http.converter.HttpMessageNotWritableException:
- org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Infinite r
- java.lang.ClassNotFoundException: org.springframework.http.converter.json.MappingJacksonHttpMessageC
- 经检查,各种没问题,但是前台500。后台org.springframework.http.converter.HttpMessageNotWritableException
- java.lang.ClassNotFoundException: org.springframework.http.converter.json.MappingJacksonHttpMessageC
- SSM框架搭建java.lang.ClassNotFoundException: org.springframework.http.converter.json.MappingJacksonHttpMessageConverter
- [Spring+MyBatis3]关联查询(延迟加载)抛错误 org.springframework.http.converter.HttpMessageNotWritableException
- org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component c
- Not found org.springframework.http.converter.json.MappingJacksonHttpMessageConverter
- schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/beans/spri
- org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component c
- Failed to read schema document 'http://www.springframework.org/schema/beans/spring- beans-3.2.xsd'
- org.springframework.remoting.RemoteConnectFailureException: Could not connect to HTTP invoker remote