无法在Tomcat 7上部署YouTrack(org.apache.catalina.LifecycleException)

时间:2014-02-02 15:12:20

标签: java apache tomcat servlets youtrack

我正在尝试安装YouTrack。我安装了Tomcat 7,工作正常(我可以加载localhost:8080)。现在我正在尝试部署YouTrack。我按照他们网站上的说明进行操作:

  
      
  1. 在Tomcat servlet容器中部署youtrack-xx.war:

         
        
    1. 如果您运行Tomcat(例如作为Windows服务),请在部署YouTrack之前停止Tomcat实例。

    2.   
    3. youtrack-xx.war保存在$TOMCAT_HOME$/webapps目录中。在部署之前根据需要重命名youtrack-xx.war文件。在里面   进一步的例子我们假设YouTrack servlet名称设置为   youtrack.war

    4.   
    5. 启动Apache Tomcat并检查YouTrack是否设置正确且可用(在Web浏览器中导航到   http://yourserver:<Tomcat port>/youtrack)。

    6.   
  2.   

在第3步。我无法访问YouTrack。我得到了404.如果我去Tomcat的管理站点,它说YouTrack的Running状态是假的。如果单击“开始”,将显示以下错误消息:

FAIL - Application at context path /youtrack could not be started
FAIL - Encountered exception org.apache.catalina.LifecycleException: 
       Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/youtrack]]

我查看了logs/catalina.out,这是完整的错误:

Information: Deploying web application directory /usr/local/apache-tomcat-7.0.50/webapps/youtrack
Feb 02, 2014 3:19:26 PM org.apache.catalina.core.ContainerBase addChildInternal
Schwerwiegend: ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/youtrack]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:634)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1230)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1876)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/xml/DOMConfigurator
    at java.lang.Class.getDeclaredFields0(Native Method)
    at java.lang.Class.privateGetDeclaredFields(Class.java:2397)
    at java.lang.Class.getDeclaredFields(Class.java:1806)
    at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)
    at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:263)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:142)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)
    at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:407)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:883)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:378)
    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:5343)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 10 more
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.xml.DOMConfigurator
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
    ... 24 more

Feb 02, 2014 3:19:26 PM org.apache.catalina.startup.HostConfig deployDirectory
Schwerwiegend: Error deploying web application directory /usr/local/apache-tomcat-7.0.50/webapps/youtrack
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/youtrack]]
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:634)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1230)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1876)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)

看起来缺少某些类,但错误中引用的那个类确实存在:

$TOMCAT$/webapps/youtrack/org/apache/log4j/xml

enter image description here

1 个答案:

答案 0 :(得分:0)

您是否有全新的Tomcat安装,或者是否根据%TOMCAT%\ lib文件夹内容进行了一些修改?这可能是您在此评论中的更新下描述的问题:https://stackoverflow.com/a/8832023/469159