• 手机版

    扫码体验手机版

  • 微信公众号

    扫码关注公众号

国内首家协议开发

软芯音视解码保护平台

在线
客服

发布
需求

在线
聊天

天盟
APP

天盟APP下载

关注
微信

微信扫一扫访问
顶部

求助。网页报空指针异常

用struts2和mysql写的网站,大致就是从数据库读取信息列表,再刚启动tomcat的时候都没有问题,可是时间一长(可能么大概要好几个小时,没法准确定位时间),就出现空指针异常的错误,刷新一下又能正常显示(多次刷新还是会出现报错),重启tomcat之后在一段时间内不会出现这种情况,贴下部分报错信息

Stacktraces

java.lang.NullPointerException
    com.kongtrolink.service.impl.NewsDaoImpl.queryAllNews(NewsDaoImpl.java:36)    com.kongtrolink.action.NewsAction.query(NewsAction.java:28)    sun.reflect.GeneratedMethodAccessor122.invoke(Unknown Source)    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)    java.lang.reflect.Method.invoke(Method.java:497)    com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)    com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)    com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)    com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)    org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)    com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)    com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)    com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)    com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)    org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)    org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)    org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)    com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)    com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)    org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)    com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)    com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)    com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)    org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)    com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)    com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)    org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)    org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)    org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)    com.kongtrolink.filter.UeditorFilter.doFilter(UeditorFilter.java:23)    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217)    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)    org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)    org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)    org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)    java.lang.Thread.run(Thread.java:745)

免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。

版权声明:作者保留权利,不代表天盟立场。

使用道具 举报

发新帖

发布任务需求已有1031284位用户正在使用天盟网服务

发布分类: *
任务预算: *
需求内容: *
手机号码: *
任务商家报价为
  • 预算价 :
  • 成交价 :
  • 完工期 :
  • 质保期 :

* 最终任务项目以服务商报价、双方协商为准!