Tomcat7试图进行一场不存在的战争,然后失败了


java.lang.IllegalArgumentException: Document base /var/lib/tomcat7/webapps/Monocle does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:137)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:5197)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5386)
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(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:745)

Out tomcat7无法启动。为了确定问题是tomcat本身还是我的代码,我从webapps文件夹中删除了除ROOT文件夹外的所有war文件。当我开始时,它未能抛出上述错误。Monocle是我删除的一场战争。我不明白为什么它还在试图找到Monocle。我已经从work文件夹中删除了Catalina文件夹。有人能帮我吗?我需要从任何其他位置清除缓存吗?

您可以验证TOMCAT_HOME/conf/server.xml文件

在标记中,appBase属性的默认值为wepapps,可能是您更改了appBase="/var/lib/tomcat7/webapps/Monocle"。

希望这能有所帮助!!!

ps:如果没有,请添加更多信息。例如:TOMCAT_HOME/conf/server.xml、TOMCAT_HHOME/conf/context.xml

<Host name="localhost"  appBase="webapps"
unpackWARs="true" autoDeploy="true">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />
</Host>

最新更新