错误: 2024-06-19 13:23:09,873 INFO [com.t.extend.SpringContextLoaderListener] - generate index.html sucess 13:23:10.159 [RMI TCP Connection(3)-127.0.0.1] ERROR org.apache.struts2.dispatcher.Dispatcher - Dispatcher initialization failed com.opensymphony.xwork2.config.ConfigurationException: Unable to load configuration. at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69) ~[struts2-core-2.5.29.jar:2.5.29] at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:970) ~[struts2-core-2.5.29.jar:2.5.29] at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:463) ~[struts2-core-2.5.29.jar:2.5.29] at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:496) [struts2-core-2.5.29.jar:2.5.29] at org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:73) [struts2-core-2.5.29.jar:2.5.29] at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:61) [struts2-core-2.5.29.jar:2.5.29] at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:285) [catalina.jar:8.0.53] at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:266) [catalina.jar:8.0.53] at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108) [catalina.jar:8.0.53] at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4747) [catalina.jar:8.0.53] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5389) [catalina.jar:8.0.53] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) [catalina.jar:8.0.53] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755) [catalina.jar:8.0.53] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:731) [catalina.jar:8.0.53] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) [catalina.jar:8.0.53] at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1730) [catalina.jar:8.0.53] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_20] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_20] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_20] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_20] at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300) [tomcat-coyote.jar:8.0.53] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) [?:1.8.0_20] at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) [?:1.8.0_20] at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:485) [catalina.jar:8.0.53] at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:434) [catalina.jar:8.0.53] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_20] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_20] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_20] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_20] at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300) [tomcat-coyote.jar:8.0.53] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) [?:1.8.0_20] at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) [?:1.8.0_20] at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468) [?:1.8.0_20] at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1466) [?:1.8.0_20] at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) [?:1.8.0_20] at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1307) [?:1.8.0_20] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_20] at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1406) [?:1.8.0_20] at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:828) [?:1.8.0_20] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_20] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_20] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_20] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_20] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323) [?:1.8.0_20] at sun.rmi.transport.Transport$1.run(Transport.java:178) [?:1.8.0_20] at sun.rmi.transport.Transport$1.run(Transport.java:175) [?:1.8.0_20] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_20] at sun.rmi.transport.Transport.serviceCall(Transport.java:174) [?:1.8.0_20] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:557) [?:1.8.0_20] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:812) [?:1.8.0_20] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:671) [?:1.8.0_20] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_20] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_20] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_20] Caused by: com.opensymphony.xwork2.config.ConfigurationException: Unable to load jar:file:/D:/code/shkeyan/t-parent/t-web/target/t-web/WEB-INF/lib/struts2-core-6.0.0.jar!/struts-default.xml at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:1087) ~[struts2-core-2.5.29.jar:2.5.29] at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:198) ~[struts2-core-2.5.29.jar:2.5.29] at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:165) ~[struts2-core-2.5.29.jar:2.5.29] at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:166) ~[struts2-core-2.5.29.jar:2.5.29] at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66) ~[struts2-core-2.5.29.jar:2.5.29] ... 53 more Caused by: com.opensymphony.xwork2.XWorkException at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:120) ~[struts2-core-2.5.29.jar:2.5.29] at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:1081) ~[struts2-core-2.5.29.jar:2.5.29] at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:198) ~[struts2-core-2.5.29.jar:2.5.29] at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:165) ~[struts2-core-2.5.29.jar:2.5.29] at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:166) ~[struts2-core-2.5.29.jar:2.5.29] at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66) ~[struts2-core-2.5.29.jar:2.5.29] ... 53 more Caused by: java.io.FileNotFoundException: http://struts.apache.org/dtds/struts-2.6.dtd at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1834) ~[?:1.8.0_20] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439) ~[?:1.8.0_20] at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:640) ~[?:1.8.0_20] at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1293) ~[?:1.8.0_20] at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1260) ~[?:1.8.0_20] at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:263) ~[?:1.8.0_20] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1164) ~[?:1.8.0_20] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1050) ~[?:1.8.0_20] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:964) ~[?:1.8.0_20] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606) ~[?:1.8.0_20] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117) ~[?:1.8.0_20] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510) ~[?:1.8.0_20] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848) ~[?:1.8.0_20] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777) ~[?:1.8.0_20] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) ~[?:1.8.0_20] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) ~[?:1.8.0_20] at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649) ~[?:1.8.0_20] at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:333) ~[?:1.8.0_20] at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:118) ~[struts2-core-2.5.29.jar:2.5.29] at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:1081) ~[struts2-core-2.5.29.jar:2.5.29] at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:198) ~[struts2-core-2.5.29.jar:2.5.29] at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:165) ~[struts2-core-2.5.29.jar:2.5.29] at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:166) ~[struts2-core-2.5.29.jar:2.5.29] at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66) ~[struts2-core-2.5.29.jar:2.5.29] ... 53 more 19-Jun-2024 13:23:10.192 ���� [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file 19-Jun-2024 13:23:10.192 ���� [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [/t_web] startup failed due to previous errors 19-Jun-2024 13:23:10.220 ���� [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [t_web] registered the JDBC driver [oracle.jdbc.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. [2024-06-19 01:23:10,229] Artifact t-web:war exploded: Error during artifact deployment. See server log for details. 原因: 同一个项目,加载后启动吧报错。 解决方案: 1,检查jdk,配置对应jdk.
2,检查maven,配置对应仓库。如果修改仓库地址一定要勾选。override3,maven >clean ;install
4,重启开发环境。
5,Rebuild project 重新构建。
6,重启。ok
正确结果:
2024-06-19 14:22:33,271 INFO [com.t.extend.SpringContextLoaderListener] - generate index.html sucess [2024-06-19 02:22:34,260] Artifact t-web:war exploded: Artifact is deployed successfully [2024-06-19 02:22:34,261] Artifact t-web:war exploded: Deploy took 24,777 milliseconds标签:index,java,1.8,29,Unable,20,com,Dispatcher,2.5 From: https://www.cnblogs.com/mingyangli/p/18256198