关于Jfinal的NullPointerException问题

本人纯属虚构 发布于 2013/08/18 13:53
阅读 981
收藏 0


哪位给分析下下面的报错是哪里的问题呢?

下面的错误是偶发性的 也就是同样的10次url请求 可能会有1次报错 

我的服务器是用apache+tomcat 通过ajp通信的


2013-08-15 18:18:08

[ERROR]-[Thread: ajp-apr-8009-exec-9]-[com.jfinal.core.ActionHandler.handle()]: /user/yaoQing?qq=1625980300&code=234015170512460 
java.lang.NullPointerException 
at org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:184) 
at com.jfinal.render.TextRender.render(TextRender.java:57) 
at com.jfinal.core.ActionHandler.handle(ActionHandler.java:94) 
at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:65) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) 
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) 
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) 
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) 
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) 
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) 
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) 
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) 
at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:197) 
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) 
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1822) 
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 
at java.lang.Thread.run(Thread.java:662) 


2013-08-15 18:18:08 
[ERROR]-[Thread: ajp-apr-8009-exec-9]-[com.jfinal.core.JFinalFilter.doFilter()]: /user/yaoQing?qq=1625980300&code=234015170512460 
com.jfinal.render.RenderException: java.lang.IllegalStateException: Cannot forward after response has been committed 
at com.jfinal.render.JspRender.render(JspRender.java:58) 
at com.jfinal.render.Error500Render.render(Error500Render.java:46) 
at com.jfinal.core.ActionHandler.handle(ActionHandler.java:121) 
at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:65) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) 
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) 
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) 
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) 
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) 
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) 
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) 
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) 
at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:197) 
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) 
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1822) 
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 
at java.lang.Thread.run(Thread.java:662) 
Caused by: java.lang.IllegalStateException: Cannot forward after response has been committed 
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:349) 
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339) 
at com.jfinal.render.JspRender.render(JspRender.java:56) 
... 18 more 

加载中
0
JFinal
JFinal

    第一个空指针异常发生在org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:184) ,目标测与 JFinal无关,建议检查一下Apache 与 AJP 相关配置

    第二个异常是IllegalStateException: Cannot forward after response has been committed,是指在此代码之前从 HttpResponse得到的 Writer输出流已经被关闭如:writer.close()。调试检查一下前面在Handler、Controller、Interceptor中是否做过这样的操作

JFinal
JFinal
回复 @本人纯属虚构 : 为啥不用nginx 呢?轻量、资源占用低,配置简单
本人纯属虚构
本人纯属虚构
我也感觉和apache ajp有关系 但是是偶发的 也不知道如何检查 下面那个也知道意思,不过没有写代码close都是直接调用的jfinal的方法 在方法执行前检查了下code是否合法 不过也没有close 也没提示我那一行代码抛出来的错 汗....
0
本人纯属虚构
本人纯属虚构

引用来自“JFinal”的答案

    第一个空指针异常发生在org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:184) ,目标测与 JFinal无关,建议检查一下Apache 与 AJP 相关配置

    第二个异常是IllegalStateException: Cannot forward after response has been committed,是指在此代码之前从 HttpResponse得到的 Writer输出流已经被关闭如:writer.close()。调试检查一下前面在Handler、Controller、Interceptor中是否做过这样的操作

还没用过nginx

我去了解下 

0
本人纯属虚构
本人纯属虚构

引用来自“JFinal”的答案

    第一个空指针异常发生在org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:184) ,目标测与 JFinal无关,建议检查一下Apache 与 AJP 相关配置

    第二个异常是IllegalStateException: Cannot forward after response has been committed,是指在此代码之前从 HttpResponse得到的 Writer输出流已经被关闭如:writer.close()。调试检查一下前面在Handler、Controller、Interceptor中是否做过这样的操作

难道 

Apache与Nginx

就相当于

SSH与Jfina?

返回顶部
顶部