springboot集成struts2,在开发工具(eclipse)运行正常。打成jar包或war包,使用java -jar执行,均会出现以下错误:求如何解决?
java.lang.NullPointerException: null
at com.opensymphony.xwork2.util.fs.JarEntryRevision.build(JarEntryRevision.java:52) ~[xwork-core-2.3.32.jar!/:2.3.32]
at com.opensymphony.xwork2.util.fs.DefaultFileManager.monitorFile(DefaultFileManager.java:97) [xwork-core-2.3.32.jar!/:2.3.32]
at com.opensymphony.xwork2.util.fs.DefaultFileManager.loadFile(DefaultFileManager.java:74) [xwork-core-2.3.32.jar!/:2.3.32]
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:1015) [xwork-core-2.3.32.jar!/:2.3.32]
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:167) [xwork-core-2.3.32.jar!/:2.3.32]
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:134) [xwork-core-2.3.32.jar!/:2.3.32]
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:239) [xwork-core-2.3.32.jar!/:2.3.32]
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67) [xwork-core-2.3.32.jar!/:2.3.32]
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:978) [struts2-core-2.3.32.jar!/:2.3.32]
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:446) [struts2-core-2.3.32.jar!/:2.3.32]
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:490) [struts2-core-2.3.32.jar!/:2.3.32]
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74) [struts2-core-2.3.32.jar!/:2.3.32]
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57) [struts2-core-2.3.32.jar!/:2.3.32]
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:285) [tomcat-embed-core-8.5.16.jar!/:8.5.16]
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:112) [tomcat-embed-core-8.5.16.jar!/:8.5.16]
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4590) [tomcat-embed-core-8.5.16.jar!/:8.5.16]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5233) [tomcat-embed-core-8.5.16.jar!/:8.5.16]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.16.jar!/:8.5.16]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419) [tomcat-embed-core-8.5.16.jar!/:8.5.16]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) [tomcat-embed-core-8.5.16.jar!/:8.5.16]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_11]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
回答
struts2.3重复扫描。struts2.5不会报这个错误,但是打成jar包依然不能启动,springboot2,no action found