• Tomcat unable to start


    在学习springMvc时,导入springfreemarker 的jar包,写好web.xml,config.xml 后。

    部署到tomcat,异常如下:

    八月 27, 2016 5:44:41 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
    警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:springMvc' did not find a matching property.
    八月 27, 2016 5:44:42 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Server version: Apache Tomcat/7.0.68
    八月 27, 2016 5:44:42 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Server built: Feb 8 2016 20:25:54 UTC
    八月 27, 2016 5:44:42 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Server number: 7.0.68.0
    八月 27, 2016 5:44:42 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: OS Name: Windows 7
    八月 27, 2016 5:44:42 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: OS Version: 6.1
    八月 27, 2016 5:44:42 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Architecture: x86
    八月 27, 2016 5:44:42 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Java Home: C:Program FilesJavajre1.8.0_60
    八月 27, 2016 5:44:42 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: JVM Version: 1.8.0_60-b27
    八月 27, 2016 5:44:42 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: JVM Vendor: Oracle Corporation
    八月 27, 2016 5:44:42 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: CATALINA_BASE: D:Eclipse.metadata.pluginsorg.eclipse.wst.server.core mp3
    八月 27, 2016 5:44:42 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: CATALINA_HOME: D: omcat
    八月 27, 2016 5:44:42 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Command line argument: -Dcatalina.base=D:Eclipse.metadata.pluginsorg.eclipse.wst.server.core mp3
    八月 27, 2016 5:44:42 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Command line argument: -Dcatalina.home=D: omcat
    八月 27, 2016 5:44:42 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Command line argument: -Dwtp.deploy=D:Eclipse.metadata.pluginsorg.eclipse.wst.server.core mp3wtpwebapps
    八月 27, 2016 5:44:42 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Command line argument: -Djava.endorsed.dirs=D: omcatendorsed
    八月 27, 2016 5:44:42 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Command line argument: -Dfile.encoding=GBK
    八月 27, 2016 5:44:42 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    信息: Loaded APR based Apache Tomcat Native library 1.1.33 using APR version 1.5.1.
    八月 27, 2016 5:44:42 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
    八月 27, 2016 5:44:42 下午 org.apache.catalina.core.AprLifecycleListener initializeSSL
    信息: OpenSSL successfully initialized (OpenSSL 1.0.1m 19 Mar 2015)
    八月 27, 2016 5:44:43 下午 org.apache.coyote.AbstractProtocol init
    信息: Initializing ProtocolHandler ["http-apr-8080"]
    八月 27, 2016 5:44:43 下午 org.apache.coyote.AbstractProtocol init
    信息: Initializing ProtocolHandler ["ajp-apr-8009"]
    八月 27, 2016 5:44:43 下午 org.apache.catalina.startup.Catalina load
    信息: Initialization processed in 1410 ms
    八月 27, 2016 5:44:43 下午 org.apache.catalina.core.StandardService startInternal
    信息: Starting service Catalina
    八月 27, 2016 5:44:43 下午 org.apache.catalina.core.StandardEngine startInternal
    信息: Starting Servlet Engine: Apache Tomcat/7.0.68
    八月 27, 2016 5:44:43 下午 org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
    信息: validateJarFile(D:Eclipse.metadata.pluginsorg.eclipse.wst.server.core mp3wtpwebappsspringMvcWEB-INFlibjavax.servlet-5.1.12.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
    八月 27, 2016 5:44:44 下午 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[/springMvc]]
    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:1120)
    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:1572)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1562)
    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[/springMvc]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
    ... 6 more
    Caused by: java.lang.NoClassDefFoundError: Lorg/apache/commons/logging/Log;
    at java.lang.Class.getDeclaredFields0(Native Method)
    at java.lang.Class.privateGetDeclaredFields(Unknown Source)
    at java.lang.Class.getDeclaredFields(Unknown Source)
    at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)
    at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:270)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:139)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65)
    at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:415)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:892)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
    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:5472)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    ... 6 more
    Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.Log
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1858)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
    ... 20 more

    八月 27, 2016 5:44:44 下午 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:1120)
    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:738)
    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:1572)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1562)
    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:1128)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    ... 6 more

    八月 27, 2016 5:44:44 下午 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:738)
    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:1128)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    ... 11 more

    八月 27, 2016 5:44:44 下午 org.apache.coyote.AbstractProtocol pause
    信息: Pausing ProtocolHandler ["http-apr-8080"]
    八月 27, 2016 5:44:44 下午 org.apache.coyote.AbstractProtocol pause
    信息: Pausing ProtocolHandler ["ajp-apr-8009"]
    八月 27, 2016 5:44:44 下午 org.apache.catalina.core.StandardService stopInternal
    信息: Stopping service Catalina
    八月 27, 2016 5:44:44 下午 org.apache.coyote.AbstractProtocol destroy
    信息: Destroying ProtocolHandler ["http-apr-8080"]
    八月 27, 2016 5:44:44 下午 org.apache.coyote.AbstractProtocol destroy
    信息: Destroying ProtocolHandler ["ajp-apr-8009"]

    网上查看:

    1、servlet.jar 包是servlet5.jar的,可能与tomcat 不兼容,改为servler3.jar;还是出错

    2、查看web servlet-mapping url-pattern 路径ok,springmvc controller requestMapping ok

    3、检查未加入 common.log.jar 包,加入后 ,重新 run on server,错误解决。

  • 相关阅读:
    MS-DOS命令
    寻找一条通过迷宫的路径
    linux文件基本操作和常用命令
    网络基础
    计算机基础---操作系统
    GIT 使用
    计算机基础
    秒角士网站
    咖啡项目
    winfrom面向对象1
  • 原文地址:https://www.cnblogs.com/lls002-1435/p/5813471.html
Copyright © 2020-2023  润新知