http 500 Internal Server Error的错误 ajax请求后台获取不到返回值,返回500 Internal Server Error服务器错误
2019-08-20 15:10
2839 查看
版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/bugle_call/article/details/99845310
问题:
用ajax与后台交互的时候,后台能查询出数据只是再返回到ajax中的时候报500Internal Server Error,并且返回的参数都为空
解决:
1、查看谷歌浏览器检查ajax情况:
Type Exception Report
Message No converter found for return value of type: class com.zwan.util.ResultUtil
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
org.springframework.http.converter.HttpMessageNotWritableException: No converter found for return value of type: class com.zwan.util.ResultUtil
2、发现找不到类型为com.zwan.util.resultutil的返回值的转换器:No converter found for return value of type: class com.zwan.util.ResultUtil
No converter found for return value of type解决方法
错误为没有该类型值的转换器,但是@responseBody注解会自动将返回数据封装成json格式,前台接收不到json对象,应该为json包版本冲突问题。
- 查看有没有json包,我是缺少json包导致的,使用2.7.4版本后就可以了;
- 查看使用的json包的版本是否冲突,换一个版本
更换json包的版本要注意spring和json版本兼容问题
相关文章推荐
- http 500 Internal Server Error的错误 ajax请求SpringMVC后台中返回500 Internal Server Error
- php进主页出现:HTTP 错误 500(Internal Server Error):服务器尝试执行请求时遇到了意外情况。
- PHP HTTP 错误 500(Internal Server Error):服务器尝试执行请求时遇到了意外情况。
- 各种HTTP返回错误代码大全 HTTP 403 Forbidden / 404 Not Found / 500 Internal Server Error / 502 Bad Gateway / 50
- Sys.WebForms.PageRequestManagerServerErrorException: 在服务器上处理请求时出现未知错误。服务器返回的状态码为: 500
- Sys.WebForms.PageRequestManagerServerErrorException: 在服务器上处理请求时出现未知错误。服务器返回的状态码为: 500
- 在使用updatepanel 时,上传到服务器出现如下错误: Sys.WebForms.PageRequestManagerServerErrorException: 在服务器上处理请求时出现未知错误。服务器返回的状态码为: 500
- 各种HTTP返回错误代码大全 HTTP 403 Forbidden / 404 Not Found / 500 Internal Server Error / 502 Bad Gateway / 50
- 错误: Sys.WebForms.PageRequestManagerServerErrorException: 在服务器上处理 请求时出现未知错误。服务器返回的状态码为: 500
- .net问题:尝试打开web项目,web服务器报告以下错误:http/1.1 500 Internal server error,请问该怎么解决这个问题??
- Sys.WebForms.PageRequestManagerServerErrorException: 在服务器上处理请求时出现未知错误。服务器返回的状态码为: 500 .
- Sys.WebForms.PageRequestManagerServerErrorException: 在服务器上处理请求时出现未知错误。服务器返回的状态码为: 500
- BUG:在安装 Visual Studio 6.0 Service Pack 6 后,尝试查看 ASP 页面时收到“HTTP 500 - Internal server error”(HTTP 500 - 内部服务器错误)错误消息
- PageRequestManagerServerErrorException: 在服务器上处理 请求时出现未知错误。服务器返回的状态码为: 500
- JQuery发送Ajax请求出现 500 Internal Server Error
- HTTP 错误 500.19 - Internal Server Error 无法访问请求的页面,因为该页的相关配置数据无效 的解决办法
- ajax返回json格式 报500 Internal Server Error
- isa的错误代码:500 internal server error 。不支持请求 (50)
- HTTP 错误 500.19 - Internal Server Error 无法访问请求的页面,因为该页的相关配置数据无效
- 解决"利用Html5的FileRead接口和Formdata上传文件到appweb服务器"报500(internal server error)错误