The servlets named [xxx] and [com.web.xxx] are both mapped to the url-pattern
来源:互联网 发布:org域名不能注册了? 编辑:程序博客网 时间:2024/05/18 03:50
因为用的是Dynamic web module version 3.0
所以Servlet被创建出来都是默认使用注解的形式
但是由于我的注解貌似无法启动
所以我手动在web.xml中配置Servlet
然后启动Tomcat的时候会报 IllegalArgumentException
原因是 The servlets named [AddLinkManServlet] and [com.web.AddLinkManServlet] are both mapped to the url-pattern [/AddLinkManServlet] which is not permitted
直译过来是很扯蛋的原因:被命名为AddLinkManServlet和 [com.web.AddLinkManServlet] 的servlet们都被匹配到了[/AddLinkManServlet] 这个url-pattern去了
注意这个servlets有个s
可能就意味着我配置了两次的servlet
所以我回到AddLinkManServlet这个类里面
把注解删掉
重启Tomcat
Done 一切正常
问题解决
严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/hibernate_crm]]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[/hibernate_crm]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
... 6 more
Caused by: java.lang.IllegalArgumentException: The servlets named [AddLinkManServlet] and [com.web.AddLinkManServlet] are both mapped to the url-pattern [/AddLinkManServlet] 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
五月 19, 2017 3:06:24 下午 org.apache.catalina.core.ContainerBase startInternal
严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
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.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:444)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:756)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.startup.Catalina.start(Catalina.java:693)
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:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:428)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
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: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1127)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
... 6 more
五月 19, 2017 3:06:24 下午 org.apache.catalina.startup.Catalina start
严重: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
at org.apache.catalina.startup.Catalina.start(Catalina.java:693)
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:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:428)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:756)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:444)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1127)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
... 11 more
五月 19, 2017 3:06:24 下午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["http-bio-8080"]
五月 19, 2017 3:06:24 下午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["ajp-bio-8009"]
五月 19, 2017 3:06:24 下午 org.apache.catalina.core.StandardService stopInternal
信息: Stopping service Catalina
五月 19, 2017 3:06:24 下午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler ["http-bio-8080"]
五月 19, 2017 3:06:24 下午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler ["ajp-bio-8009"]
阅读全文
0 0
- The servlets named [xxx] and [com.web.xxx] are both mapped to the url-pattern
- The servlets named [UserExit] and [com.fxh.control.UserExit] are both mapped to the url-pattern [/Us
- The servlets named [] and [] are both mapped to the url-pattern [/] which is not permitted
- maven创建Web项目启动错误The servlets named [X] and [Y] are both mapped to the url-pattern [/DemoServlet]
- The servlets named [LogRecord] and [com.action.service.imp.LogServiceImp] are both mapped to the url
- tomcat报"The servlets named [x] and [y] are both mapped to the url-pattern[z] which is not permitted"
- The servlets named [X] and [Y] are both mapped to the url-pattern [/Z] which is not permitted
- The servlets named [x] and [y] are both mapped to the url-pattern [/JServlet] which is not permitted
- The servlets named [A] and [B] are both mapped to the url-pattern [/servlet/]which is not permitted
- J2EE的TOMCAT服务器报The servlets named [x] and [y] are both mapped to the url-pattern[z] which is not per
- The servlets .. are both mapped to the url-pattern [/ControllerServlet] which is not permitted
- MyEclispe启动Tomcat7时出现错误The servlets named [LoginServlet] and [com.liu.control.LoginServlet] are both
- mybatis报错:The alias 'xxx' is already mapped to the value 'com.demo.xxx'
- the type xxx was not mapped
- The type 'xxx' exists in both '.../项目名.dll' and '.../App_Code.0qkogcke.dll'错误总结
- Error:Application and test application id cannot be the same: both are 'com.xxxxxxx' for debugAndroi
- Google App Engine错误解决方案之Class com.xxx.xxx does not seem to have been enhanced. You may want to rerun the enhancer and check for
- iOS-Restore the connection to "“XXX”的 iPho" and run "XXX" again, or if "XXX" is still running, you c
- Matlab文件和数据的导入与导出
- SuperMap杯全国高校GIS大赛-制图组学习资料
- django+mysql+syncdb
- spring前台map传值
- 物理层常识
- The servlets named [xxx] and [com.web.xxx] are both mapped to the url-pattern
- Linux进程地址空间
- 环境搭建
- php向mysql数据库查询、插入、删除较多条数据
- 阻止微信浏览器的下滑出现空白事件
- springboot的启动Your ApplicationContext is unlikely to start due to a @ComponentScan of the default pac
- 【第3期】量化大咖来了!揭开量化对冲的神秘面纱
- 抽象类和接口的区别
- poj 1323 Game Prediction