在开发过程中,给
com.thunisoft.fy.business.sp.SelectListUtils 新增加了一个public static方法 getTestSelectList()。在页面的处理的logic类里面使用的时候代码提示都可以提示出来,调用方法也没有报编译期错误。刷新界面后,后台运行到刚才调用的地方就报如下错误:
有点不太明白,为什么增加静态方法就要重启tomcat服务?这样在开发过程中如果经常增加static方法岂不是每次都要重启,然后就会很浪费时间了。另外,为什么如果我只是修改了原来已经存在的static方法的实现,则可以正常调试。
2008
-
04
-
21
12
:
30
:
27
,
032
[com.thunisoft.summer.web.action.BaseAction]
-
[ERROR] runtime exception
java.lang.NoSuchMethodError: com.thunisoft.fy.business.sp.SelectListUtils.getTestSelectList()Lcom / thunisoft / fy / support / selectObj / SelectList;
at com.thunisoft.fy.spxt.pub.ajxq.AjxqLogic.displayZxAjxq_right(AjxqLogic.java: 736 )
at com.thunisoft.fy.spxt.pub.ajxq.AjxqLogic.displayAjxq_right(AjxqLogic.java: 116 )
at 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: 324 )
at com.thunisoft.summer.web.action.MemoryAction.execute(MemoryAction.java: 102 )
at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java: 106 )
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java: 430 )
at com.thunisoft.fy.web.struts.SummerRequestProcessor.process(SummerRequestProcessor.java: 134 )
at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1196 )
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java: 414 )
at javax.servlet.http.HttpServlet.service(HttpServlet.java: 689 )
at javax.servlet.http.HttpServlet.service(HttpServlet.java: 802 )
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 237 )
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 157 )
at com.thunisoft.summer.web.filter.UserAASFilter.doFilter(UserAASFilter.java: 111 )
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 186 )
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 157 )
at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java: 46 )
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 186 )
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 157 )
at com.thunisoft.summer.web.filter.CharsetFilter.doFilter(CharsetFilter.java: 48 )
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 186 )
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 157 )
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 214 )
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 104 )
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520 )
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java: 198 )
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 152 )
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 104 )
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520 )
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java: 137 )
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 104 )
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java: 118 )
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 102 )
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520 )
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: 109 )
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 104 )
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520 )
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java: 929 )
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java: 160 )
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java: 799 )
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java: 705 )
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java: 577 )
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java: 683 )
at java.lang.Thread.run(Thread.java: 534 )
咨询同事,得到的是“增加静态方法”要重启tomcat服务。我重启了tomcat果然就没有问题了:)
java.lang.NoSuchMethodError: com.thunisoft.fy.business.sp.SelectListUtils.getTestSelectList()Lcom / thunisoft / fy / support / selectObj / SelectList;
at com.thunisoft.fy.spxt.pub.ajxq.AjxqLogic.displayZxAjxq_right(AjxqLogic.java: 736 )
at com.thunisoft.fy.spxt.pub.ajxq.AjxqLogic.displayAjxq_right(AjxqLogic.java: 116 )
at 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: 324 )
at com.thunisoft.summer.web.action.MemoryAction.execute(MemoryAction.java: 102 )
at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java: 106 )
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java: 430 )
at com.thunisoft.fy.web.struts.SummerRequestProcessor.process(SummerRequestProcessor.java: 134 )
at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1196 )
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java: 414 )
at javax.servlet.http.HttpServlet.service(HttpServlet.java: 689 )
at javax.servlet.http.HttpServlet.service(HttpServlet.java: 802 )
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 237 )
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 157 )
at com.thunisoft.summer.web.filter.UserAASFilter.doFilter(UserAASFilter.java: 111 )
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 186 )
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 157 )
at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java: 46 )
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 186 )
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 157 )
at com.thunisoft.summer.web.filter.CharsetFilter.doFilter(CharsetFilter.java: 48 )
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 186 )
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 157 )
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 214 )
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 104 )
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520 )
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java: 198 )
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 152 )
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 104 )
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520 )
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java: 137 )
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 104 )
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java: 118 )
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 102 )
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520 )
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: 109 )
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 104 )
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520 )
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java: 929 )
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java: 160 )
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java: 799 )
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java: 705 )
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java: 577 )
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java: 683 )
at java.lang.Thread.run(Thread.java: 534 )
有点不太明白,为什么增加静态方法就要重启tomcat服务?这样在开发过程中如果经常增加static方法岂不是每次都要重启,然后就会很浪费时间了。另外,为什么如果我只是修改了原来已经存在的static方法的实现,则可以正常调试。