tomcat突然启动失败了
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/D:/apache-tomcat-9.0.37-windows-x64/apache-tomcat-9.0.37/lib/catalina.jar) to field java.io.ObjectStreamClass$Caches.localDescs
WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
这是控制台打印的警告 怎么解决啊
正在回答
同学你好
控制台的信息没有相关提示,同学点击一下这个详细信息看一下呢?
猜测有可能是因为端口号占用,之前是否有启动过Tomcat没有关呢?
建议同学找到Tomcat的安装目录下的bin目录,双击
shutdown.bat 命令关闭一下Tomcat,然后再启动试试。
祝学习愉快。
8月 24, 2020 3:05:45 下午 org.apache.catalina.core.ContainerBase startInternal
严重: 子容器启动失败
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 子容器启动失败
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
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:738)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
Caused by: org.apache.catalina.LifecycleException: 子容器启动失败
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.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
... 13 more
Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/books]]
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
... 21 more
Caused by: org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/books]]
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.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
... 21 more
Caused by: java.lang.IllegalArgumentException: 名为 [com.imooc.servlet.BookServlet]和 [com.imooc.servlet.UpBookSrevlet] 的servlet不能映射为一个url模式(url-pattern) [/dept]
at org.apache.tomcat.util.descriptor.web.WebXml.addServletMappingDecoded(WebXml.java:343)
at org.apache.tomcat.util.descriptor.web.WebXml.addServletMapping(WebXml.java:336)
at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2676)
at org.apache.catalina.startup.ContextConfig.processClass(ContextConfig.java:2352)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2341)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2233)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.processClasses(ContextConfig.java:1439)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1351)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:983)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:302)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5044)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 27 more
8月 24, 2020 3:05:45 下午 org.apache.catalina.startup.Catalina start
严重: 所必需的服务组件启动失败,所以无法启动Tomcat
org.apache.catalina.LifecycleException: 子容器启动失败
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:738)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 子容器启动失败
严重: 子容器启动失败
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/books]]
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
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.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
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:738)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
Caused by: org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/books]]
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.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
... 21 more
Caused by: java.lang.IllegalArgumentException: 名为 [com.imooc.servlet.BookServlet]和 [com.imooc.servlet.UpBookSrevlet] 的servlet不能映射为一个url模式(url-pattern) [/dept]
at org.apache.tomcat.util.descriptor.web.WebXml.addServletMappingDecoded(WebXml.java:343)
at org.apache.tomcat.util.descriptor.web.WebXml.addServletMapping(WebXml.java:336)
at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2676)
at org.apache.catalina.startup.ContextConfig.processClass(ContextConfig.java:2352)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2341)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2233)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.processClasses(ContextConfig.java:1439)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1351)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:983)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:302)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5044)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 27 more
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
... 13 more
Caused by: org.apache.catalina.LifecycleException: 子容器启动失败
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.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
... 13 more
Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/books]]
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
... 21 more
Caused by: org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/books]]
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.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
... 21 more
Caused by: java.lang.IllegalArgumentException: 名为 [com.imooc.servlet.BookServlet]和 [com.imooc.servlet.UpBookSrevlet] 的servlet不能映射为一个url模式(url-pattern) [/dept]
at org.apache.tomcat.util.descriptor.web.WebXml.addServletMappingDecoded(WebXml.java:343)
at org.apache.tomcat.util.descriptor.web.WebXml.addServletMapping(WebXml.java:336)
at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2676)
at org.apache.catalina.startup.ContextConfig.processClass(ContextConfig.java:2352)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2341)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2233)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.processClasses(ContextConfig.java:1439)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1351)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:983)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:302)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5044)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 27 more
8月 24, 2020 3:05:45 下午 org.apache.coyote.AbstractProtocol pause
信息: 暂停ProtocolHandler["http-nio-8080"]
8月 24, 2020 3:05:45 下午 org.apache.catalina.core.StandardService stopInternal
信息: 正在停止服务[Catalina]
8月 24, 2020 3:05:45 下午 org.apache.coyote.AbstractProtocol destroy
信息: 正在摧毁协议处理器 ["http-nio-8080"]
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/D:/apache-tomcat-9.0.37-windows-x64/apache-tomcat-9.0.37/lib/catalina.jar) to field java.io.ObjectStreamClass$Caches.localDescs
WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
8月 24, 2020 3:05:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server.服务器版本: Apache Tomcat/9.0.37
8月 24, 2020 3:05:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 服务器构建: Jun 30 2020 20:09:49 UTC
8月 24, 2020 3:05:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 服务器版本号(: 9.0.37.0
8月 24, 2020 3:05:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 操作系统名称: Windows 10
8月 24, 2020 3:05:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS.版本: 10.0
8月 24, 2020 3:05:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 架构: amd64
8月 24, 2020 3:05:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java 环境变量: D:\Java\jdk-14.0.1
8月 24, 2020 3:05:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java虚拟机版本: 14.0.1+7
8月 24, 2020 3:05:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM.供应商: Oracle Corporation
8月 24, 2020 3:05:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: D:\apache-tomcat-9.0.37-windows-x64\apache-tomcat-9.0.37
8月 24, 2020 3:05:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: D:\apache-tomcat-9.0.37-windows-x64\apache-tomcat-9.0.37
8月 24, 2020 3:05:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 命令行参数:-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:51568
8月 24, 2020 3:05:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 命令行参数:-javaagent:D:\App\eclipse\configuration\org.eclipse.osgi\413\0\.cp\lib\javaagent-shaded.jar
8月 24, 2020 3:05:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 命令行参数:-Dcatalina.base=D:\apache-tomcat-9.0.37-windows-x64\apache-tomcat-9.0.37
8月 24, 2020 3:05:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 命令行参数:-Dcatalina.home=D:\apache-tomcat-9.0.37-windows-x64\apache-tomcat-9.0.37
8月 24, 2020 3:05:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 命令行参数:-Dwtp.deploy=D:\eclipse-workspace
8月 24, 2020 3:05:44 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 命令行参数:-Dfile.encoding=UTF-8
8月 24, 2020 3:05:44 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: 使用APR版本[1.7.0]加载了基于APR的Apache Tomcat本机库[1.2.24]。
8月 24, 2020 3:05:44 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: APR功能:IPv6[true]、sendfile[true]、accept filters[false]、random[true]。
8月 24, 2020 3:05:44 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: APR/OpenSSL配置:useAprConnector[false],useOpenSSL[true]
8月 24, 2020 3:05:44 下午 org.apache.catalina.core.AprLifecycleListener initializeSSL
信息: OpenSSL成功初始化 [OpenSSL 1.1.1g 21 Apr 2020]
8月 24, 2020 3:05:44 下午 org.apache.coyote.AbstractProtocol init
信息: 初始化协议处理器 ["http-nio-8080"]
8月 24, 2020 3:05:44 下午 org.apache.catalina.startup.Catalina load
信息: 服务器在[872]毫秒内初始化
8月 24, 2020 3:05:44 下午 org.apache.catalina.core.StandardService startInternal
信息: 正在启动服务[Catalina]
8月 24, 2020 3:05:44 下午 org.apache.catalina.core.StandardEngine startInternal
信息: 正在启动 Servlet 引擎:[Apache Tomcat/9.0.37]
8月 24, 2020 3:05:45 下午 org.apache.catalina.core.ContainerBase startInternal
===========================================
这是控制台 打印的所有信息
- 参与学习 人
- 提交作业 676 份
- 解答问题 9666 个
本阶段将从前端网页搭建入手,到Java Web基础,前后端结合助你完成Java Web小白的蜕变!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星