java配置springmvc启动tomcat报错 More than one fragment with the name [spring_web] was found.

配置springmvc启动tomcat报错 More than one fragment with the name [spring_web] was found.报错。

解决方法:

ide环境是eclipse, 配置环境时候在项目属性----->java build path—>Libraries–>中导入springmvc相关jar包,

然后在deployment assembly 中添加springmvc相关jar包,注意要排查掉spring-web-4.3.24.RELEASE-sources.jar,

否则会报错:More than one fragment with the name [spring_web] was found.

注:一定要删除spring-web-4.3.24.RELEASE-sources.jar 等…sources.jar源文件

完整的错误报告如下:

    八月 08, 2019 9:28:09 下午 org.apache.catalina.core.StandardContext reload
    严重: Exception starting Context with name [/HelloWeb]
    org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/HelloWeb]]
    	at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
    	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
    	at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3755)
    	at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:292)
    	at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:5527)
    	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1353)
    	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1357)
    	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1357)
    	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1335)
    	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    	at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    	at java.lang.Thread.run(Unknown Source)
    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.tomcat.util.descriptor.web.WebXml.orderWebFragments(WebXml.java:2257)
    	at org.apache.tomcat.util.descriptor.web.WebXml.orderWebFragments(WebXml.java:2215)
    	at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1134)
    	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:775)
    	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:301)
    	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
    	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5048)
    	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    	... 15 more
    
    八月 08, 2019 9:28:09 下午 org.apache.catalina.core.StandardContext reload
    信息: Reloading Context with name [/HelloWeb] is completed
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Yfw&武

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值