java struct jar,【Java】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.(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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值