问题描述
java.lang.NullPointerExceptionat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.directwebremoting.util.Continuation.suspend(Continuation.java:57)at org.directwebremoting.dwrp.JettyContinuationSleeper.goToSleep(JettyContinuationSleeper.java:90)at org.directwebremoting.dwrp.PollHandler.handle(PollHandler.java:214)at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101)at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146)at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)at java.lang.Thread.run(Thread.java:662) 问题补充:定位不到哪句代码出错了。全部的信息就这些17:19:56,397 WARN org.directwebremoting.dwrp.JettyContinuationSleeper:96 - Exceptionjava.lang.NullPointerExceptionat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.directwebremoting.util.Continuation.suspend(Continuation.java:57)at org.directwebremoting.dwrp.JettyContinuationSleeper.goToSleep(JettyContinuationSleeper.java:90)at org.directwebremoting.dwrp.PollHandler.handle(PollHandler.java:214)at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101)at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146)at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)at java.lang.Thread.run(Thread.java:662)17:19:56,416 INFO com.lingtu.gps.action.LoginAction:128 - url:/terminalTree!subscribe.action?_dc=1331543996306&cid=711331543993138
解决方案
DWR配置文件你还没贴呢
解决方案二:
你对DWR的配置文件,及工程 的运行环境(中间件是TOMCAT?还是JETTY还是其他?)
解决方案三:
因为dwr从2.0版本就全面支持jetty的continuation方式,所以在jetty上运行的时候,会自动使用jetty的continuation,不需要任何多余的配置,也就是说:这时用的已经不是dwr自身的反转ajax了,而是jetty的实现方式。 所以当dwr在jetty上运行的时候,不需要配置反转ajax,不然会冲突
解决方案四:
贴个DWR版本出来,详细到小版本
解决方案五:
先debug Java代码,看是否是action里面出现的NullPointerException .jsp里是否有Java代码? 也有可能是Jsp中Java代码报的错误。
解决方案六:
先定位哪段代码出错,然后把出错的一段代码贴上来看下~