springboot+struts2打成jar包运行
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.<init>(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]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
struts2.3重复扫描。struts2.5不会报这个错误,但是打成jar包依然不能启动,springboot2,no action found