0

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

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

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

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

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

在第 3 步。我无法访问 YouTrack。我得到一个 404。如果我去 Tomcat 的管理站点,它说 YouTrack 的运行状态为 false。如果我单击开始,它将显示以下错误消息:

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

在此处输入图像描述

4

1 回答 1

0

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

于 2014-02-03T11:28:24.883 回答