couldn't clear tomcat cache java.lang.NoSuchFieldException: resourceEntries
2015-09-25 00:17:11,435 WARN [dqapp24 http-nio-8002-exec-22] com.opensymphony.xwork2.util.LocalizedTextUtil couldn't clear tomcat cache java.lang.NoSuchFieldException: resourceEntries at java.lang.Class.getDeclaredField(Class.java:2062) ~[na:1.8.0_25] at com.opensymphony.xwork2.util.LocalizedTextUtil.clearMap(LocalizedTextUtil.java:835) [xwork-core-2.3.15.3.jar:2.3.15.3] at com.opensymphony.xwork2.util.LocalizedTextUtil.clearTomcatCache(LocalizedTextUtil.java:818) [xwork-core-2.3.15.3.jar:2.3.15.3] at com.opensymphony.xwork2.util.LocalizedTextUtil.reloadBundles(LocalizedTextUtil.java:797) [xwork-core-2.3.15.3.jar:2.3.15.3] at com.opensymphony.xwork2.util.LocalizedTextUtil.reloadBundles(LocalizedTextUtil.java:780) [xwork-core-2.3.15.3.jar:2.3.15.3] at com.opensymphony.xwork2.util.LocalizedTextUtil.findDefaultText(LocalizedTextUtil.java:205) [xwork-core-2.3.15.3.jar:2.3.15.3] at com.opensymphony.xwork2.util.LocalizedTextUtil.findDefaultText(LocalizedTextUtil.java:227) [xwork-core-2.3.15.3.jar:2.3.15.3] at com.opensymphony.xwork2.DefaultTextProvider.getText(DefaultTextProvider.java:67) [xwork-core-2.3.15.3.jar:2.3.15.3] at com.opensymphony.xwork2.DefaultTextProvider.getText(DefaultTextProvider.java:82) [xwork-core-2.3.15.3.jar:2.3.15.3] at com.opensymphony.xwork2.DefaultTextProvider.getText(DefaultTextProvider.java:129) [xwork-core-2.3.15.3.jar:2.3.15.3] at org.apache.struts2.util.TextProviderHelper.getText(TextProviderHelper.java:75) [struts2-core-2.3.15.3.jar:2.3.15.3] at org.apache.struts2.components.Text.end(Text.java:160) [struts2-core-2.3.15.3.jar:2.3.15.3] at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42) [struts2-core-2.3.15.3.jar:2.3.15.3] at org.apache.jsp.monitor_jsp._jspx_meth_s_005ftext_005f0(monitor_jsp.java:128) [mms/:na] at org.apache.jsp.monitor_jsp._jspService(monitor_jsp.java:85) [mms/:na] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [jasper.jar:8.0.15] at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) [servlet-api.jar:na] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) [jasper.jar:8.0.15] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396) [jasper.jar:8.0.15] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340) [jasper.jar:8.0.15] at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) [servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) [catalina.jar:8.0.15] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.15] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.0.15] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.15] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.15] at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206) [javamelody-core-1.45.0.jar:1.45.0] at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:179) [javamelody-core-1.45.0.jar:1.45.0] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.15] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.15] at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96) [struts2-core-2.3.15.3.jar:2.3.15.3] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.15] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.15] at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:163) [javamelody-core-1.45.0.jar:1.45.0] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.15] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.15] at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) [shiro-web-1.2.2.jar:1.2.2] at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) [shiro-web-1.2.2.jar:1.2.2] at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) [shiro-web-1.2.2.jar:1.2.2] at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.2.2.jar:1.2.2] at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) [shiro-web-1.2.2.jar:1.2.2] at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) [shiro-web-1.2.2.jar:1.2.2] at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) [shiro-web-1.2.2.jar:1.2.2] at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.2.jar:1.2.2] at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.2.jar:1.2.2] at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) [shiro-core-1.2.2.jar:1.2.2] at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) [shiro-web-1.2.2.jar:1.2.2] at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.2.2.jar:1.2.2] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) [spring-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) [spring-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.15] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.15] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) [catalina.jar:8.0.15] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [catalina.jar:8.0.15] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) [catalina.jar:8.0.15] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [catalina.jar:8.0.15] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.15] at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) [catalina.jar:8.0.15] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.15] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537) [catalina.jar:8.0.15] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1085) [tomcat-coyote.jar:8.0.15] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658) [tomcat-coyote.jar:8.0.15] at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222) [tomcat-coyote.jar:8.0.15] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1556) [tomcat-coyote.jar:8.0.15] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1513) [tomcat-coyote.jar:8.0.15] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_25] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.15] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_25]
如何产生的问题:
解决方法:
1. 重启tomcat(暂时解决)
2. 降低tomcat 版本到7
3. 修改LocalizedTextUtil.java 重新编译xwork-core 。
源码地址:https://github.com/apache/struts
修改内容:https://github.com/apache/struts/commit/a35c3ef4f6211268e04f4c167f14650c88505628
截图: