Javaweb配置Tomcat服务器常见问题

Javaweb学习笔记 专栏收录该内容
5 篇文章 0 订阅

Javaweb配置Tomcat服务器常见问题

一.tomcat和jdk版本字长不匹配

错误代码:Can’t load IA 32-bit .dll on a AMD 64-bit platform

二.jar冲突

  1. 将低版本的servlet-api.jar包作为高版本的库,或者把当前版本的服务器tomcat/lib下的servlet-api复制到项目中,其实没有必要,因为web项目已经关联依赖了tomcat/lib下面的jar包。

  2. 错误代码如下

    D:\apache-tomcat-8.5.57\bin\catalina.bat run
    [2020-07-21 03:54:51,103] Artifact day07-Servlet:war exploded: Waiting for server connection to start artifact deployment...
    Using CATALINA_BASE:   "C:\Users\孤独成瘾\AppData\Local\JetBrains\IntelliJIdea2020.1\tomcat\Tomcat_8_5_57_day07-Servlet"
    Using CATALINA_HOME:   "D:\apache-tomcat-8.5.57"
    Using CATALINA_TMPDIR: "D:\apache-tomcat-8.5.57\temp"
    Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_241"
    Using CLASSPATH:       "D:\apache-tomcat-8.5.57\bin\bootstrap.jar;D:\apache-tomcat-8.5.57\bin\tomcat-juli.jar"
    21-Jul-2020 15:54:52.374 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.服务器版本: Apache Tomcat/8.5.57
    21-Jul-2020 15:54:52.375 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 服务器构建:        Jun 30 2020 21:49:10 UTC
    21-Jul-2020 15:54:52.375 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 服务器版本号(:     8.5.57.0
    21-Jul-2020 15:54:52.375 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 操作系统名称:      Windows 10
    21-Jul-2020 15:54:52.375 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS.版本:           10.0
    21-Jul-2020 15:54:52.375 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 架构:              amd64
    21-Jul-2020 15:54:52.375 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java 环境变量:     C:\Program Files\Java\jdk1.8.0_241\jre
    21-Jul-2020 15:54:52.375 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java虚拟机版本:    1.8.0_241-b07
    21-Jul-2020 15:54:52.376 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM.供应商:        Oracle Corporation
    21-Jul-2020 15:54:52.376 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:     C:\Users\孤独成瘾\AppData\Local\JetBrains\IntelliJIdea2020.1\tomcat\Tomcat_8_5_57_day07-Servlet
    21-Jul-2020 15:54:52.376 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:     D:\apache-tomcat-8.5.57
    21-Jul-2020 15:54:52.376 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:-Djava.util.logging.config.file=C:\Users\孤独成瘾\AppData\Local\JetBrains\IntelliJIdea2020.1\tomcat\Tomcat_8_5_57_day07-Servlet\conf\logging.properties
    21-Jul-2020 15:54:52.376 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
    21-Jul-2020 15:54:52.376 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:-Dcom.sun.management.jmxremote=
    21-Jul-2020 15:54:52.376 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:-Dcom.sun.management.jmxremote.port=1099
    21-Jul-2020 15:54:52.376 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:-Dcom.sun.management.jmxremote.ssl=false
    21-Jul-2020 15:54:52.376 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:-Dcom.sun.management.jmxremote.password.file=C:\Users\孤独成瘾\AppData\Local\JetBrains\IntelliJIdea2020.1\tomcat\Tomcat_8_5_57_day07-Servlet\jmxremote.password
    21-Jul-2020 15:54:52.376 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:-Dcom.sun.management.jmxremote.access.file=C:\Users\孤独成瘾\AppData\Local\JetBrains\IntelliJIdea2020.1\tomcat\Tomcat_8_5_57_day07-Servlet\jmxremote.access
    21-Jul-2020 15:54:52.376 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:-Djava.rmi.server.hostname=127.0.0.1
    21-Jul-2020 15:54:52.376 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:-Djdk.tls.ephemeralDHKeySize=2048
    21-Jul-2020 15:54:52.376 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:-Djava.protocol.handler.pkgs=org.apache.catalina.webresources
    21-Jul-2020 15:54:52.376 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:-Dignore.endorsed.dirs=
    21-Jul-2020 15:54:52.377 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:-Dcatalina.base=C:\Users\孤独成瘾\AppData\Local\JetBrains\IntelliJIdea2020.1\tomcat\Tomcat_8_5_57_day07-Servlet
    21-Jul-2020 15:54:52.377 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:-Dcatalina.home=D:\apache-tomcat-8.5.57
    21-Jul-2020 15:54:52.377 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:-Djava.io.tmpdir=D:\apache-tomcat-8.5.57\temp
    21-Jul-2020 15:54:52.377 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent 使用APR版本[1.7.0]加载了基于APR的Apache Tomcat本机库[1.2.24]。
    21-Jul-2020 15:54:52.377 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR功能:IPv6[true]、sendfile[true]、accept filters[false]、random[true]。
    21-Jul-2020 15:54:52.379 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL配置:useAprConnector[false],useOpenSSL[true]
    21-Jul-2020 15:54:52.381 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL成功初始化 [OpenSSL 1.1.1g  21 Apr 2020]
    21-Jul-2020 15:54:52.516 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 ["http-nio-8080"]
    21-Jul-2020 15:54:52.545 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
    21-Jul-2020 15:54:52.565 信息 [main] org.apache.catalina.startup.Catalina.load Initialization processed in 599 ms
    21-Jul-2020 15:54:52.617 信息 [main] org.apache.catalina.core.StandardService.startInternal 正在启动服务[Catalina]
    21-Jul-2020 15:54:52.617 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.57
    21-Jul-2020 15:54:52.636 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["http-nio-8080"]
    21-Jul-2020 15:54:52.658 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in 94 ms
    Connected to server
    [2020-07-21 03:54:52,679] Artifact day07-Servlet:war exploded: Artifact is being deployed, please wait...
    21-Jul-2020 15:54:52.812 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.descriptor.DigesterFactory.locationFor XML模型[web-app_3_0.xsd]未找到,如果XML校验功能开启了的话,这很可能终止XML校验
    21-Jul-2020 15:54:52.813 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.descriptor.DigesterFactory.locationFor XML模型[web-fragment_3_0.xsd]未找到,如果XML校验功能开启了的话,这很可能终止XML校验
    21-Jul-2020 15:54:52.813 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.descriptor.DigesterFactory.locationFor XML模型[web-common_3_0.xsd]未找到,如果XML校验功能开启了的话,这很可能终止XML校验
    21-Jul-2020 15:54:52.813 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.descriptor.DigesterFactory.locationFor XML模型[javaee_6.xsd]未找到,如果XML校验功能开启了的话,这很可能终止XML校验
    21-Jul-2020 15:54:52.814 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.descriptor.DigesterFactory.locationFor XML模型[jsp_2_2.xsd]未找到,如果XML校验功能开启了的话,这很可能终止XML校验
    21-Jul-2020 15:54:52.814 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.descriptor.DigesterFactory.locationFor XML模型[javaee_web_services_1_3.xsd]未找到,如果XML校验功能开启了的话,这很可能终止XML校验
    21-Jul-2020 15:54:52.815 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.descriptor.DigesterFactory.locationFor XML模型[javaee_web_services_client_1_3.xsd]未找到,如果XML校验功能开启了的话,这很可能终止XML校验
    21-Jul-2020 15:54:52.815 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.descriptor.DigesterFactory.locationFor XML模型[web-app_3_1.xsd]未找到,如果XML校验功能开启了的话,这很可能终止XML校验
    21-Jul-2020 15:54:52.815 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.descriptor.DigesterFactory.locationFor XML模型[web-fragment_3_1.xsd]未找到,如果XML校验功能开启了的话,这很可能终止XML校验
    21-Jul-2020 15:54:52.816 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.descriptor.DigesterFactory.locationFor XML模型[web-common_3_1.xsd]未找到,如果XML校验功能开启了的话,这很可能终止XML校验
    21-Jul-2020 15:54:52.816 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.descriptor.DigesterFactory.locationFor XML模型[javaee_7.xsd]未找到,如果XML校验功能开启了的话,这很可能终止XML校验
    21-Jul-2020 15:54:52.816 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.descriptor.DigesterFactory.locationFor XML模型[jsp_2_3.xsd]未找到,如果XML校验功能开启了的话,这很可能终止XML校验
    21-Jul-2020 15:54:52.816 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.descriptor.DigesterFactory.locationFor XML模型[javaee_web_services_1_4.xsd]未找到,如果XML校验功能开启了的话,这很可能终止XML校验
    21-Jul-2020 15:54:52.817 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.descriptor.DigesterFactory.locationFor XML模型[javaee_web_services_client_1_4.xsd]未找到,如果XML校验功能开启了的话,这很可能终止XML校验
    21-Jul-2020 15:54:52.889 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.descriptor.web.WebXml.setVersion 未知版本字符串 [4.0]。将使用默认版本。
    21-Jul-2020 15:54:52.905 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: 
    	org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/day07_Servlet_war_exploded]]
    		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.addChildInternal(ContainerBase.java:743)
    		at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
    		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
    		at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1719)
    		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    		at java.lang.reflect.Method.invoke(Method.java:498)
    		at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:286)
    		at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    		at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    		at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:479)
    		at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:428)
    		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    		at java.lang.reflect.Method.invoke(Method.java:498)
    		at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:286)
    		at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    		at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    		at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
    		at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
    		at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
    		at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
    		at java.security.AccessController.doPrivileged(Native Method)
    		at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)
    		at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
    		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    		at java.lang.reflect.Method.invoke(Method.java:498)
    		at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
    		at sun.rmi.transport.Transport$1.run(Transport.java:200)
    		at sun.rmi.transport.Transport$1.run(Transport.java:197)
    		at java.security.AccessController.doPrivileged(Native Method)
    		at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
    		at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
    		at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
    		at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
    		at java.security.AccessController.doPrivileged(Native Method)
    		at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
    		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    		at java.lang.Thread.run(Thread.java:748)
    	Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getClassLoader()Ljava/lang/ClassLoader;
    		at org.apache.tomcat.util.scan.StandardJarScanner.doScanClassPath(StandardJarScanner.java:251)
    		at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:234)
    		at org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:1916)
    		at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1130)
    		at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:779)
    		at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
    		at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
    		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5053)
    		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    		... 44 more
    21-Jul-2020 15:54:52.913 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke Exception invoking method manageApp
    	java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/day07_Servlet_war_exploded]]
    		at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:747)
    		at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
    		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
    		at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1719)
    		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    		at java.lang.reflect.Method.invoke(Method.java:498)
    		at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:286)
    		at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    		at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    		at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:479)
    [2020-07-21 03:54:52,951] Artifact day07-Servlet:war exploded: Error during artifact deployment. See server log for details.
    		at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:428)
    		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    		at java.lang.reflect.Method.invoke(Method.java:498)
    		at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:286)
    		at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    		at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    		at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
    		at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
    		at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
    		at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
    		at java.security.AccessController.doPrivileged(Native Method)
    		at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)
    		at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
    		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    		at java.lang.reflect.Method.invoke(Method.java:498)
    		at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
    		at sun.rmi.transport.Transport$1.run(Transport.java:200)
    		at sun.rmi.transport.Transport$1.run(Transport.java:197)
    		at java.security.AccessController.doPrivileged(Native Method)
    		at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
    		at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
    		at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
    		at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
    		at java.security.AccessController.doPrivileged(Native Method)
    		at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
    		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    		at java.lang.Thread.run(Thread.java:748)
    21-Jul-2020 15:54:52.914 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke Exception invoking method createStandardContext
    	javax.management.RuntimeOperationsException: Exception invoking method manageApp
    		at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:294)
    		at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    		at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    		at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:479)
    		at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:428)
    		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    		at java.lang.reflect.Method.invoke(Method.java:498)
    		at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:286)
    		at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    		at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    		at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
    		at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
    		at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
    		at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
    		at java.security.AccessController.doPrivileged(Native Method)
    		at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)
    		at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
    		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    		at java.lang.reflect.Method.invoke(Method.java:498)
    		at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
    		at sun.rmi.transport.Transport$1.run(Transport.java:200)
    		at sun.rmi.transport.Transport$1.run(Transport.java:197)
    		at java.security.AccessController.doPrivileged(Native Method)
    		at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
    		at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
    		at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
    		at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
    		at java.security.AccessController.doPrivileged(Native Method)
    		at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
    		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    		at java.lang.Thread.run(Thread.java:748)
    	Caused by: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/day07_Servlet_war_exploded]]
    		at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:747)
    		at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
    		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
    		at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1719)
    		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    		at java.lang.reflect.Method.invoke(Method.java:498)
    		at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:286)
    		... 35 more
    21-Jul-2020 15:55:02.638 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory 把web 应用程序部署到目录 [D:\apache-tomcat-8.5.57\webapps\manager]
    21-Jul-2020 15:55:02.670 严重 [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: 
    	org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/manager]]
    		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.addChildInternal(ContainerBase.java:743)
    		at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
    		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
    		at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1125)
    		at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1858)
    		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    		at java.lang.Thread.run(Thread.java:748)
    	Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getClassLoader()Ljava/lang/ClassLoader;
    		at org.apache.tomcat.util.scan.StandardJarScanner.doScanClassPath(StandardJarScanner.java:251)
    		at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:234)
    		at org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:1916)
    		at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1130)
    		at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:779)
    		at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
    		at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
    		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5053)
    		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    		... 10 more
    21-Jul-2020 15:55:02.671 严重 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory 无法部署应用目录 [D:\apache-tomcat-8.5.57\webapps\manager]
    	java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/manager]]
    		at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:747)
    		at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
    		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
    		at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1125)
    		at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1858)
    		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    		at java.lang.Thread.run(Thread.java:748)
    21-Jul-2020 15:55:02.675 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Web应用程序目录[D:\apache-tomcat-8.5.57\webapps\manager]的部署已在[36]毫秒内完成
    
    

三tomcat和jdk版本匹配

在这里插入图片描述

  • 0
    点赞
  • 1
    评论
  • 0
    收藏
  • 打赏
    打赏
  • 扫一扫,分享海报

评论 1 您还未登录,请先 登录 后发表或查看评论
©️2022 CSDN 皮肤主题:大白 设计师:CSDN官方博客 返回首页

打赏作者

scanf_s("%s",&Mr.lonely)

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

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

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

打赏作者

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

抵扣说明:

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

余额充值