org.apache.catalina.LifecycleException:无法启动组件[StandardEngine [Catalina] .StandardHost [localhost]

时间:2013-09-09 17:32:02

标签: java eclipse tomcat

我正在使用Eclipse在Apache Tomcat服务器上部署应用程序修复服务,但问题似乎是该应用程序没有被复制到webapps文件夹中,即它没有被发布。

HTTPConnectionManager类已经存在于构建路径的jar中。

Sep 09, 2013 1:24:46 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/repair-service] has started
Sep 09, 2013 1:25:01 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception starting Context with name [/repair-service]
org.apache.catalina.LifecycleException: Failed to start component 

    [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/repair-service]]
        `enter code here`at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3926)
        at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1271)
        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1440)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:301)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1374)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
        at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NoClassDefFoundError: org/apache/commons/httpclient/HttpConnectionManager
        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:261)
        at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:140)
        at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)
        at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:405)
        at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:881)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5179)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 11 more
    Caused by: java.lang.ClassNotFoundException: org.apache.commons.httpclient.HttpConnectionManager
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
        ... 25 more

    Sep 09, 2013 1:25:01 PM org.apache.catalina.core.StandardContext reload
    INFO: Reloading Context with name [/repair-service] is completed

1 个答案:

答案 0 :(得分:0)

只是检查,您的类路径中是否有Apache HTTP Client的jar?如果没有,请添加并尝试再次部署该应用程序。

修改 确保在“项目属性>部署程序集”中选择了库。另一个选择是将该依赖项放在Tomcat库目录中。