梅钲琪
精灵王
精灵王
  • UID157
  • 粉丝2
  • 关注0
  • 发帖数70
  • 社区居民
阅读:14029回复:3

导出问题

楼主#
更多 发布于:2016-10-11 15:11
麻烦帮忙看一下这个导出问题, 报的是日期转化问题,但是处理了还是报这个错,其它地方都是对的,好神奇
java.lang.NullPointerException
15:20:36,259 ERROR [STDERR]  at com.sunsheen.jfids.report.excel.GridToExcelServlet.doGet(GridToExcelServlet.java:108)
15:20:36,259 ERROR [STDERR]  at com.sunsheen.jfids.report.excel.GridToExcelServlet.doPost(GridToExcelServlet.java:121)
15:20:36,259 ERROR [STDERR]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
15:20:36,259 ERROR [STDERR]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
15:20:36,259 ERROR [STDERR]  at com.sunsheen.jfids.system.servlet.SystemPageFilter.a(Unknown Source)
15:20:36,259 ERROR [STDERR]  at com.sunsheen.jfids.system.servlet.SystemPageFilter.doFilter(Unknown Source)
15:20:36,259 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
15:20:36,259 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
15:20:36,259 ERROR [STDERR]  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:79)
15:20:36,259 ERROR [STDERR]  at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
15:20:36,259 ERROR [STDERR]  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:67)
15:20:36,259 ERROR [STDERR]  at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
15:20:36,259 ERROR [STDERR]  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:67)
15:20:36,259 ERROR [STDERR]  at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
15:20:36,259 ERROR [STDERR]  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:67)
15:20:36,259 ERROR [STDERR]  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
15:20:36,259 ERROR [STDERR]  at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
15:20:36,259 ERROR [STDERR]  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:67)
15:20:36,260 ERROR [STDERR]  at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)
15:20:36,260 ERROR [STDERR]  at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:65)
15:20:36,260 ERROR [STDERR]  at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)
15:20:36,260 ERROR [STDERR]  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:67)
15:20:36,260 ERROR [STDERR]  at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:156)
15:20:36,260 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
15:20:36,260 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
15:20:36,260 ERROR [STDERR]  at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
15:20:36,260 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
15:20:36,260 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
15:20:36,260 ERROR [STDERR]  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
15:20:36,260 ERROR [STDERR]  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
15:20:36,260 ERROR [STDERR]  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
15:20:36,260 ERROR [STDERR]  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
15:20:36,260 ERROR [STDERR]  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
15:20:36,260 ERROR [STDERR]  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
15:20:36,260 ERROR [STDERR]  at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
15:20:36,260 ERROR [STDERR]  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
15:20:36,260 ERROR [STDERR]  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
15:20:36,260 ERROR [STDERR]  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
15:20:36,260 ERROR [STDERR]  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
15:20:36,260 ERROR [STDERR]  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
15:20:36,260 ERROR [STDERR]  at java.lang.Thread.run(Thread.java:745)
15:20:36,260 INFO  [STDOUT] 16-10-11 15:20:36,260 ERROR [root] - 加载Servlet:com.sunsheen.jfids.report.excel.GridToExcelServlet,出现错误,错误原因:java.lang.String cannot be cast to java.util.Date
15:20:36,261 INFO  [STDOUT] 2511059 [http-0.0.0.0-8888-6] ERROR root  - 加载Servlet:com.sunsheen.jfids.report.excel.GridToExcelServlet,出现错误,错误原因:java.lang.String cannot be cast to java.util.Date

15:20:36,261 ERROR [STDERR] java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Date
15:20:36,261 ERROR [STDERR]  at com.sunsheen.jfids.report.excel.GridToExcelServlet.initOrtherRowExcel(GridToExcelServlet.java:320)
15:20:36,261 ERROR [STDERR]  at com.sunsheen.jfids.report.excel.GridToExcelServlet.getExcel(GridToExcelServlet.java:167)
15:20:36,261 ERROR [STDERR]  at com.sunsheen.jfids.report.excel.GridToExcelServlet.doGet(GridToExcelServlet.java:99)
15:20:36,261 ERROR [STDERR]  at com.sunsheen.jfids.report.excel.GridToExcelServlet.doPost(GridToExcelServlet.java:121)
15:20:36,261 ERROR [STDERR]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
15:20:36,261 ERROR [STDERR]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
15:20:36,261 ERROR [STDERR]  at com.sunsheen.jfids.system.servlet.SystemPageFilter.a(Unknown Source)
15:20:36,261 ERROR [STDERR]  at com.sunsheen.jfids.system.servlet.SystemPageFilter.doFilter(Unknown Source)
15:20:36,261 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
15:20:36,261 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
15:20:36,261 ERROR [STDERR]  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:79)
15:20:36,261 ERROR [STDERR]  at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
15:20:36,261 ERROR [STDERR]  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:67)
15:20:36,261 ERROR [STDERR]  at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
15:20:36,261 ERROR [STDERR]  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:67)
15:20:36,261 ERROR [STDERR]  at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
15:20:36,261 ERROR [STDERR]  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:67)
15:20:36,261 ERROR [STDERR]  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
15:20:36,262 ERROR [STDERR]  at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
15:20:36,262 ERROR [STDERR]  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:67)
15:20:36,262 ERROR [STDERR]  at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)
15:20:36,262 ERROR [STDERR]  at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:65)
15:20:36,262 ERROR [STDERR]  at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)
15:20:36,262 ERROR [STDERR]  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:67)
15:20:36,262 ERROR [STDERR]  at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:156)
15:20:36,262 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
15:20:36,262 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
15:20:36,262 ERROR [STDERR]  at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
15:20:36,262 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
15:20:36,262 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
15:20:36,262 ERROR [STDERR]  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
15:20:36,262 ERROR [STDERR]  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
15:20:36,262 ERROR [STDERR]  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
15:20:36,262 ERROR [STDERR]  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
15:20:36,262 ERROR [STDERR]  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
15:20:36,262 ERROR [STDERR]  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
15:20:36,262 ERROR [STDERR]  at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
15:20:36,262 ERROR [STDERR]  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
15:20:36,266 ERROR [STDERR]  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
15:20:36,266 ERROR [STDERR]  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
15:20:36,266 ERROR [STDERR]  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
15:20:36,266 ERROR [STDERR]  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
15:20:36,266 ERROR [STDERR]  at java.lang.Thread.run(Thread.java:745)

图片:8.png

图片:9.png

图片:QQ截图20161011152659.png

编码无他,唯手熟尔。
杨潇
骑士
骑士
  • UID150
  • 粉丝1
  • 关注0
  • 发帖数6
  • 社区居民
沙发#
发布于:2016-10-13 14:31
就是你servlet中那个时间变量是空值啊,java.lang.NullPointerException空指针,你处理的时候也不能把空值转换成时间格式的吧,你去看一下可能是某个变量没有赋值,或者没有初始化。
戒骄戒躁,再小的事情也要认真的对待!
梅钲琪
精灵王
精灵王
  • UID157
  • 粉丝2
  • 关注0
  • 发帖数70
  • 社区居民
板凳#
发布于:2016-10-13 17:23
杨潇:就是你servlet中那个时间变量是空值啊,java.lang.NullPointerException空指针,你处理的时候也不能把空值转换成时间格式的吧,你去看一下可能是某个变量没有赋值,或者没有初始化。回到原帖
并不是,GridToExcelServlet.java是平台构件里面的,在jar包里面。现在已经解决了,3q
编码无他,唯手熟尔。
梅钲琪
精灵王
精灵王
  • UID157
  • 粉丝2
  • 关注0
  • 发帖数70
  • 社区居民
地板#
发布于:2016-10-13 17:30
已解决。这是一个奇葩问题,导出的excel打不开。不!是!sqlMap里面的问题!

把页面上的表格全部删了,重新做一个。就可以了。

原因不明。(感觉可能是页面有些损坏(页面能显示数据))
编码无他,唯手熟尔。
游客

返回顶部