我一直在研究Eclipse IDE和Tomcat v7.0。 到昨天为止一切正常。 即使是jsp文件也可以正常执行,因此在代码中没有错误。 早些时候,当我遇到这样的错误时,我更改了端口号,清理了服务器并投影了它的工作原理。 但是这次我尝试使用这些论坛进行以下操作

1)我在Google上尝试了所有方法。

2)更改端口号。

3)更改服务器位置。

4)删除目录中的.snap文件。

5)多次重新安装tomcat。

6)清理项目和服务器。

7)更改了tomcat的版本,但未检测到。

我尝试更改属性和所有内容。 它说no tcnative-1 in library path所以我重新安装了三次。 我不知道该怎么办 必须在3周内提交项目,而我被困住了。

谁能告诉我还有什么事吗?

Web.xml文件https://i.stack.imgur.com/PHC3o.png

Catalina日志文件位于17.14

15-Nov-2019 17:14:27.676 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name:   Apache Tomcat/9.0.27 15-Nov-2019 17:14:28.004 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Oct 7 2019 09:57:22 UTC 15-Nov-2019 17:14:28.004 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.27.0 15-Nov-2019 17:14:28.004 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 10 15-Nov-2019 17:14:28.004 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            10.0 15-Nov-2019 17:14:28.004 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64 15-Nov-2019 17:14:28.004 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             C:\Program Files\Java\jre1.8.0_201 15-Nov-2019 17:14:28.004 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_201-b09 15-Nov-2019 17:14:28.004 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation 15-Nov-2019 17:14:28.004 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\Program Files\Apache Software Foundation\Tomcat 9.0 15-Nov-2019 17:14:28.004 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         C:\Program Files\Apache Software Foundation\Tomcat 9.0 15-Nov-2019 17:14:28.363 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 9.0 15-Nov-2019 17:14:28.379 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 9.0 15-Nov-2019 17:14:28.379 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 9.0\temp 15-Nov-2019 17:14:28.379 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 15-Nov-2019 17:14:28.379 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\logging.properties 15-Nov-2019 17:14:28.379 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: exit 15-Nov-2019 17:14:28.379 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: abort 15-Nov-2019 17:14:28.379 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms128m 15-Nov-2019 17:14:28.379 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx256m 15-Nov-2019 17:14:28.379 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.7.0]. 15-Nov-2019 17:14:28.379 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 15-Nov-2019 17:14:28.379 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 15-Nov-2019 17:14:29.910 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1c  28 May 2019] 15-Nov-2019 17:14:46.926 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8085"] 15-Nov-2019 17:14:51.176 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8018"] 15-Nov-2019 17:14:51.285 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [39,257] milliseconds 15-Nov-2019 17:14:53.238 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina] 15-Nov-2019 17:14:53.238 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.27] 15-Nov-2019 17:14:59.939 SEVERE [main] 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].StandardContext[/airlines]]         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:916)         at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)         at java.util.concurrent.FutureTask.run(Unknown Source)         at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)         at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)         at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)         at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)         at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)         at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)         at org.apache.catalina.startup.Catalina.start(Catalina.java:633)         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:344)         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)     Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/airlines]]         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.ContainerBase$StartChild.call(ContainerBase.java:1384)         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)         at java.util.concurrent.FutureTask.run(Unknown Source)         at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)         at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)         at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)         ... 21 more     Caused by: java.lang.IllegalArgumentException: The servlets named [com.sathish.booking.controller.BookingServlet] and [com.sathish.flight.controller.FlightServlet] are both mapped to the url-pattern [/flight] which is not permitted         at org.apache.tomcat.util.descriptor.web.WebXml.addServletMappingDecoded(WebXml.java:342)         at org.apache.tomcat.util.descriptor.web.WebXml.addServletMapping(WebXml.java:335)         at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2459)         at org.apache.catalina.startup.ContextConfig.processClass(ContextConfig.java:2135)         at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2124)         at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2016)         at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2010)         at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2010)         at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2010)         at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2010)         at org.apache.catalina.startup.ContextConfig.processClasses(ContextConfig.java:1233)         at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1142)         at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:774)         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:5051)         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)         ... 27 more 15-Nov-2019 17:15:00.017 SEVERE [main] org.apache.catalina.core.ContainerBase.startInternal A child container failed during start     java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: A child container failed during start         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:916)         at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)         at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)         at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)         at org.apache.catalina.startup.Catalina.start(Catalina.java:633)         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:344)         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)     Caused by: org.apache.catalina.LifecycleException: A child container failed during start         at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:928)         at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)         at java.util.concurrent.FutureTask.run(Unknown Source)         at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)         at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)         at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)         ... 13 more     Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/airlines]]         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:916)         ... 21 more     Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/airlines]]         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.ContainerBase$StartChild.call(ContainerBase.java:1384)         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)         at java.util.concurrent.FutureTask.run(Unknown Source)         at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)         at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)         at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)         ... 21 more     Caused by: java.lang.IllegalArgumentException: The servlets named [com.sathish.booking.controller.BookingServlet] and [com.sathish.flight.controller.FlightServlet] are both mapped to the url-pattern [/flight] which is not permitted         at org.apache.tomcat.util.descriptor.web.WebXml.addServletMappingDecoded(WebXml.java:342)         at org.apache.tomcat.util.descriptor.web.WebXml.addServletMapping(WebXml.java:335)         at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2459)         at org.apache.catalina.startup.ContextConfig.processClass(ContextConfig.java:2135)         at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2124)         at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2016)         at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2010)         at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2010)         at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2010)         at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2010)         at org.apache.catalina.startup.ContextConfig.processClasses(ContextConfig.java:1233)         at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1142)         at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:774)         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:5051)         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)         ... 27 more 15-Nov-2019 17:15:00.017 SEVERE [main] org.apache.catalina.startup.Catalina.start The required Server component failed to start so Tomcat is unable to start.     org.apache.catalina.LifecycleException: A child container failed during start         at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:928)         at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)         at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)         at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)         at org.apache.catalina.startup.Catalina.start(Catalina.java:633)         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:344)         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)     Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: A child container failed during start         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:916)         ... 13 more     Caused by: org.apache.catalina.LifecycleException: A child container failed during start         at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:928)         at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)         at java.util.concurrent.FutureTask.run(Unknown Source)         at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)         at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)         at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)         ... 13 more     Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/airlines]]         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:916)         ... 21 more     Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/airlines]]         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.ContainerBase$StartChild.call(ContainerBase.java:1384)         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)         at java.util.concurrent.FutureTask.run(Unknown Source)         at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)         at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)         at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)         ... 21 more     Caused by: java.lang.IllegalArgumentException: The servlets named [com.sathish.booking.controller.BookingServlet] and [com.sathish.flight.controller.FlightServlet] are both mapped to the url-pattern [/flight] which is not permitted         at org.apache.tomcat.util.descriptor.web.WebXml.addServletMappingDecoded(WebXml.java:342)         at org.apache.tomcat.util.descriptor.web.WebXml.addServletMapping(WebXml.java:335)         at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2459)         at org.apache.catalina.startup.ContextConfig.processClass(ContextConfig.java:2135)         at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2124)         at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2016)         at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2010)         at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2010)         at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2010)         at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2010)         at org.apache.catalina.startup.ContextConfig.processClasses(ContextConfig.java:1233)         at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1142)         at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:774)         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:5051)         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)         ... 27 more 15-Nov-2019 17:15:00.033 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8085"] 15-Nov-2019 17:15:00.033 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8018"] 15-Nov-2019 17:15:00.033 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]  Nov-2019 17:15:00.033 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8085"] 15-Nov-2019 17:15:00.049 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8018"]![web.xml file] (https://i.stack.imgur.com/PHC3o.png)![enter image description here](https://i.stack.imgur.com/KPOT9.png) 

===============>>#1 票数:0 已采纳

您的堆栈跟踪中的错误指出:

名为[com.sathish.booking.controller.BookingServlet]和[com.sathish.flight.controller.FlightServlet]的servlet都映射到url模式[/ flight],这是不允许的

您的Servlet映射配置(可能在web.xml中,它取决于您的应用程序类型)包含两个映射到相同url的servlet。 我想您应该更改bookingServlet的servlet映射以使用/ booking url。

  ask by Megana Bhujang translate from so

本文未有回复,本站智能推荐: