==========error======={"readyState":4,"responseText":"<html><head><title>Apache Tomcat/6.0.35 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size=\"1\" noshade=\"noshade\"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Object is null (through reference chain: java.util.HashMap[&quot;data&quot;]-&gt;java.util.ArrayList[0]-&gt;net.sf.json.JSONObject[&quot;applyExcuse&quot;]-&gt;net.sf.json.JSONNull[&quot;empty&quot;]); nested exception is org.codehaus.jackson.map.JsonMappingException: Object is null (through reference chain: java.util.HashMap[&quot;data&quot;]-&gt;java.util.ArrayList[0]-&gt;net.sf.json.JSONObject[&quot;applyExcuse&quot;]-&gt;net.sf.json.JSONNull[&quot;empty&quot;])\n\torg.springframework.http.converter.json.MappingJacksonHttpMessageConverter.writeInternal(MappingJacksonHttpMessageConverter.java:194)\n\torg.springframework.http.converter.AbstractHttpMessageConverter.write(AbstractHttpMessageConverter.java:179)\n\torg.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:148)\n\torg.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(……

网上各种解释说明,然并卵。

最后发现报错中有 “org.codehaus.jackson.map.JsonMappingException: Object is null ”   意思是map值中有null。

传回前端时,null值没法转换成JSON。

ajax定义数据传输为json。

解决方案:

1、自己循环或者找工具类处理null为“”。

2、传回前端String。前端转换为JSON。

Ajax 报错 500 (Internal Server Error)的更多相关文章

  1. CI当开启URL重写的时候,报错500 Internal Server Error

    Internal Server Error The server encountered an internal error or misconfiguration and was unable to ...

  2. JQuery发送Ajax请求出现 500 Internal Server Error

    ajax返回,readyState=4,status=500,chrome f12提示,提示服务器内部错误 我采用 http://q.cnblogs.com/q/69745/的解决办法根本不行,也不是 ...

  3. 500 : Internal Server Error(jupyter)

    如需转发,请注明出处:小婷儿的python https://www.cnblogs.com/xxtalhr/p/10739036.html 一.报错 jupyter notebook能打开目录页,但是 ...

  4. Nginx频繁报“500 Internal Server Error”错误

    服务器导致访问量激增,频繁报"500 Internal Server Error"错误.我查了一下nginx的错误日志(apt-get方式安装的nginx的错误日志在/var/lo ...

  5. nginx提示:500 Internal Server Error错误的解决方法

    现在越来越多的站点开始用 Nginx ,("engine x") 是一个高性能的 HTTP 和反向代理服务器,也是一个 IMAP/POP3/SMTP 代理服务器. Nginx 是由 ...

  6. 【转】nginx提示:500 Internal Server Error错误的解决方法

    本文转自:http://www.jb51.net/article/35675.htm 现在越来越多的站点开始用 Nginx ,("engine x") 是一个高性能的 HTTP 和 ...

  7. phpstudy 500 Internal Server Error 解决办法

    版本:phpstudy 2018 报错:500 Internal Server Error 原因:手动选择路径的时候,产生了斜杠不同  (正确:"D:/phpStudy/PHPTutoria ...

  8. EBS Webservice Timeout,HTTP Server Return "500 Internal Server Error"

    http://blog.itpub.net/26687597/viewspace-1207571/ 基于Oracle EBS R12,开发了一个Webservice用于返回某项主数据,当请求的数据量非 ...

  9. python urllib2导出elasticsearch数据时 返回 "urllib2.HTTPError: HTTP Error 500: Internal Server Error"

    0.业务场景 将ES中某个index的某个字段的所有数据,导出到文件中 1.ES数据导出方法简述 ES数据导出方法,我主要找到了以下几个方面,欢迎大家补充: ES官方API:snapshot and ...

随机推荐

  1. sudo执行脚本找不到环境变量解决方法

    问题: 当普通用户下,设置并export一个变量,然后利用sudo执行echo命令,能得到变量的值,但是如果把echo命令写入脚本, 然后再sudo执行脚本,就找不到变量,未能获取到值. 原因 sud ...

  2. C++之函数模板

    C++之函数模板与模版函数 直接上代码:  C++ Code  12345678910111213141516171819202122232425262728293031323334353637383 ...

  3. Fel初认识

    Fel在源自于企业项目,设计目标是为了满足不断变化的功能需求和性能需求. Fel是开放的,引擎执行中的多个模块都可以扩展或替换.Fel的执行主要是通过函数实现,运算符(+.-等都是Fel函数),所有这 ...

  4. 在 Linux 中安装 Lighttpd Web 服务器

    Lighttpd 是一款开源 Web 服务器软件.Lighttpd 安全快速,符合行业标准,适配性强并且针对高配置环境进行了优化.相对于其它的 Web 服务器而言,Lighttpd 占用内存更少:因其 ...

  5. Android之布局属性归纳

    第一类:属性值为true或falseandroid:layout_centerHrizontal 水平居中android:layout_centerVertical 垂直居中android:layou ...

  6. 关于如何将Eclipse中@author进行修改的解决方法

    问题:Eclipse和 MyEclipse上的文档注释"/**"里面的"@author Administrator"是自动生成的姓名,有时我们需要将自己的代码进 ...

  7. java开源模板引擎

      Velocity  Velocity是一个基于java的模板引擎(template engine).它允许任何人仅仅简单的使用模板语言(template language)来引用由java代码定义 ...

  8. 浅析pc机上如何将vmlinuz-2.6.31-14-generic解压出vmlinux

    浅析pc机上如何将vmlinuz-2.6.31-14-generic解压出vmlinux luther@gliethttp:~$ vim /boot/grub/grub.cfg 可以看到我们进入的系统 ...

  9. Configuring Logging 配置日志

    NGINX Docs | Configuring Logging https://docs.nginx.com/nginx/admin-guide/monitoring/logging/[ 在上层设置 ...

  10. React中ref的用法

    在React数据流中,父子组件唯一的通信方式是通过props属性:那么如果有些场景需要获取某一个真实的DOM元素来交互,这时候就要用到React的refs属性. 1.可以给DOM元素添加ref属性 c ...