解决:

七月 04, 2020 7:49:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server.服务器版本:     Apache Tomcat/7.0.100
七月 04, 2020 7:49:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 服务器构建:            Feb 11 2020 08:31:12 UTC
七月 04, 2020 7:49:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 服务器版本号(:7.0.100.0
七月 04, 2020 7:49:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 10
七月 04, 2020 7:49:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS.版本:               10.0
七月 04, 2020 7:49:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 架构:                  amd64
七月 04, 2020 7:49:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java 环境变量:         D:\Study\JAVAEE\java\jre1.8
七月 04, 2020 7:49:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM 版本:              1.8.0_191-b12
七月 04, 2020 7:49:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM.供应商:            Oracle Corporation
七月 04, 2020 7:49:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         D:\Study\JAVAEE\Tomcat\apache-tomcat-7.0.100
七月 04, 2020 7:49:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         D:\Study\JAVAEE\Tomcat\apache-tomcat-7.0.100
七月 04, 2020 7:49:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=D:\Study\JAVAEE\Tomcat\apache-tomcat-7.0.100
七月 04, 2020 7:49:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:\Study\JAVAEE\Tomcat\apache-tomcat-7.0.100
七月 04, 2020 7:49:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=D:\Study\JAVAEE\Tomcat\apache-tomcat-7.0.100\wtpwebapps
七月 04, 2020 7:49:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:\Study\JAVAEE\Tomcat\apache-tomcat-7.0.100\endorsed
七月 04, 2020 7:49:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
七月 04, 2020 7:49:12 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [D:\Study\JAVAEE\java\jre1.8\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:/Study/JAVAEE/java/jre1.8/bin/server;D:/Study/JAVAEE/java/jre1.8/bin;D:/Study/JAVAEE/java/jre1.8/lib/amd64;D:\Study\Python\Anaconda3;D:\Study\Python\Anaconda3\Library\mingw-w64\bin;D:\Study\Python\Anaconda3\Library\usr\bin;D:\Study\Python\Anaconda3\Library\bin;D:\Study\Python\Anaconda3\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;D:\Study\DataBase\Mysql\bin;D:\Study\JAVAEE\java\jdk1.8\bin;D:\Study\JAVAEE\java\jdk1.8\jre\bin;C:\Program Files (x86)\VanDyke Software\Clients\;D:\Study\JAVAEE\Maven\apache-maven-3.6.3\bin;D:\Study\JAVAEE\Maven\apache-maven-3.6.3\bin;D:\Study\tools\Git\TortoiseGit\bin;C:\Users\11721\AppData\Local\Microsoft\WindowsApps;D:\Study\编译器\PyCharm\pycharm\PyCharm 2020.1.1\bin;;C:\Program Files (x86)\VanDyke Software\Clients\;;D:\Study\JAVAEE\Eclipse\eclipse\eclipse;;.]
七月 04, 2020 7:49:12 下午 org.apache.coyote.AbstractProtocol init
信息: 初始化协议处理器 ["http-bio-8080"]
七月 04, 2020 7:49:13 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 457 ms
七月 04, 2020 7:49:13 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service [Catalina]
七月 04, 2020 7:49:13 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.100
七月 04, 2020 7:49:13 下午 org.apache.catalina.core.ContainerBase startInternal
严重: 子容器启动失败
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/pet-buy]]
    at java.util.concurrent.FutureTask.report(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1241)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:804)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1705)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1695)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/pet-buy]]
    at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
    ... 6 more
Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found. This is not legal with relative ordering. See section 8.2.2 2c of the Servlet specification for details. Consider using absolute ordering.
    at org.apache.catalina.deploy.WebXml.orderWebFragments(WebXml.java:2338)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1279)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:888)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:388)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5606)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    ... 6 more

七月 04, 2020 7:49:13 下午 org.apache.catalina.core.ContainerBase startInternal
严重: 子容器启动失败
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 子容器启动失败
    at java.util.concurrent.FutureTask.report(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1241)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:444)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:744)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:712)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
Caused by: org.apache.catalina.LifecycleException: 子容器启动失败
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1252)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:804)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1705)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1695)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/pet-buy]]
    at java.util.concurrent.FutureTask.report(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1241)
    ... 8 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/pet-buy]]
    at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
    ... 6 more
Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found. This is not legal with relative ordering. See section 8.2.2 2c of the Servlet specification for details. Consider using absolute ordering.
    at org.apache.catalina.deploy.WebXml.orderWebFragments(WebXml.java:2338)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1279)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:888)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:388)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5606)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    ... 6 more

七月 04, 2020 7:49:13 下午 org.apache.catalina.startup.Catalina start
严重: 所必需的服务组件启动失败,所以无法启动Tomcat
org.apache.catalina.LifecycleException: 子容器启动失败
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1252)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:444)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:744)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:712)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 子容器启动失败
    at java.util.concurrent.FutureTask.report(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1241)
    ... 13 more
Caused by: org.apache.catalina.LifecycleException: 子容器启动失败
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1252)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:804)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1705)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1695)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/pet-buy]]
    at java.util.concurrent.FutureTask.report(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1241)
    ... 8 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/pet-buy]]
    at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
    ... 6 more
Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found. This is not legal with relative ordering. See section 8.2.2 2c of the Servlet specification for details. Consider using absolute ordering.
    at org.apache.catalina.deploy.WebXml.orderWebFragments(WebXml.java:2338)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1279)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:888)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:388)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5606)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    ... 6 more

七月 04, 2020 7:49:13 下午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["http-bio-8080"]
七月 04, 2020 7:49:13 下午 org.apache.catalina.core.StandardService stopInternal
信息: 正在停止服务[Catalina]
七月 04, 2020 7:49:13 下午 org.apache.coyote.AbstractProtocol destroy
信息: 正在摧毁协议处理器 ["http-bio-8080"]
 

 

解决方案(1 / 2):

1. 方案1:

我使用的是tomcat7,找到这样conf 目录下的catalina.properties文件并打开,找到这行代码:

org.apache.catalina.startup.ContextConfig.jarsToSkip=

将其改成:org.apache.catalina.startup.ContextConfig.jarsToSkip=*.jar

保存并关闭,重新启动eclipse和tomcat即可。

2. 方案2:

如果第一种方案不行,那么我们直接将

<absolute-ordering />

这行代码 放到 项目的 web.xml 即可,加入该代码后项目可能会标红,但不影响 项目的运行。

希望对大家有所帮助!~

 

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐