==========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. ubuntu 解压命令全部

    .tar解包:tar xvf FileName.tar打包:tar cvf FileName.tar DirName(注:tar是打包,不是压缩!)-------------------------- ...

  2. [转]Loadrunner Error code 10053 & Tomcat 连接器(connector)优化

    LoadRunner提示错误:Error : socket0 - Software caused connection abort. Error code : 10053. 在今天的测试过程中发现,s ...

  3. 适配iOS 8备忘录 开始启动(持续更新。。。1130)

    本文转载至 http://www.cocoachina.com/bbs/read.php?tid=229352 PS:大家都说看到那么多图标很头痛,我来给大家解决这个问题:直接下载我的这个包Image ...

  4. [Jenkins] 解决 Gradle 编译包含 SVG Drawable 出现异常

    异常信息 java.awt.AWTError: Can't connect to X11 window server using 'localhost:10.0' as the value of th ...

  5. 160302、细聊分布式ID生成方法

    一.需求缘起 几乎所有的业务系统,都有生成一个记录标识的需求,例如: (1)消息标识:message-id (2)订单标识:order-id (3)帖子标识:tiezi-id 这个记录标识往往就是数据 ...

  6. 进击的RecyclerView入门一(简单上手)

    虽然RecyclerView面世有一段时间了,但由于它的学习成本相对较高,很多码友只是粗略的认识了一下而没有细致的品味RecyclerView的真谛. 那么从现在开始我将带你装逼带你飞,一起领略Goo ...

  7. java环境变量、集成开发环境与使用两个类

    1.集成开发环境(IDE,Integrated Development Environment )是用于提供程序开发环境的应用程序,一般包括代码编辑器.编译器.调试器和图形用户界面等工具.集成了代码编 ...

  8. Java 调用并执行cmd命令

    cmd java 调用 执行 概要: Java 调用并执行cmd命令 Java | 复制 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 ...

  9. Oracle之rman常用命令及维护(51CTO风哥rman课程)

    list 查看数据库备份的信息 查询数据库对应物 list incarnation; list backup summary; 列出当前备份信息及汇总 B是备份 F是全备 A是归档 第三个A是是否有效 ...

  10. ORACLE内存结构之SGA

    SGA的管理: SQL> show parameter sga NAME                                 TYPE        VALUE ---------- ...