报错java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start c

今天运行服务器报以下错恶:

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/weiXinDevelop]]
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:1119)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1571)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1561)
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[/weiXinDevelop]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
... 6 more
Caused by: java.lang.IllegalArgumentException: The servlets named [WeiXinTest] and [kang.test.WeiXinTest] are both mapped to the url-pattern [/weixin] which is not permitted
at org.apache.catalina.deploy.WebXml.addServletMapping(WebXml.java:293)
at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2460)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2135)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2096)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2088)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2088)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1302)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:887)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:387)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5503)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
... 6 more

下截图:


找了错误:

1.看下是否jre版本太低造成

2.清除tomcat缓存

3.看报错日志的caused by原因(重要)


我这里找了下发现原因在代码中的@WebServlet标签和web.xml中的配置重复了(蓝色那行)




当我选择其中一个运行tomcat,发现成功运行了!!






评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值