无法在Tomcat 7.0.69应用程序中部署war文件

时间:2016-06-17 16:55:21

标签: java tomcat7

我需要使用Tomcat服务器7.0.69将使用Java 1.5和Tomcat 5.5构建的现有项目迁移到Java 1.8。

每当我尝试在Tomcat 7.0.69应用程序中部署war文件时,我都会遇到以下异常

我使用Java 1.8构建此应用程序。

来自“catalina.log”的错误:

Jun 11, 2016 10:25:34 AM org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/sample]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1092)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1984)
    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:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
    at java.util.Hashtable.get(Hashtable.java:363)
    at java.util.Properties.getProperty(Properties.java:969)
    at org.apache.catalina.startup.ContextConfig.authenticatorConfig(ContextConfig.java:483)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:898)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:387)
    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)
    ... 10 more

Jun 11, 2016 10:25:34 AM org.apache.catalina.startup.HostConfig deployWAR
SEVERE: Error deploying web application archive C:\Work\software\test1.8\apache-tomcat-7.0.69\webapps\sample.war
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ddsgui]]
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:903)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1092)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1984)
    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:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

1 个答案:

答案 0 :(得分:0)

我最近遇到了同样的问题。我通过从项目的web.xml文件中删除以下内容来解决它。

<login-config>
    <realm-name>Device-Monitor</realm-name>
</login-config>