[英]java.lang.IllegalArgumentException: Document base tomcat\webapps\appdata does not exist or is not a readable directory
I had a WAR previously deployed on my local Tomcat (6.0.35) instance called appdata.war
, and so the webapps directory looked like: 我之前在我的本地Tomcat(6.0.35)实例上部署了一个名为
appdata.war
,因此webapps目录看起来像:
webapps/
docs/
examples/
host-manager/
manager/
appdata/ (exploded WAR)
ROOT/
appdata.war
I deleted appdata/
and appdata.war
(so that Tomcat wouldn't try to redeploy it) and then added a new war ( appmon-qa.war
) to this directory. 我删除了
appdata/
和appdata.war
(以便Tomcat不会尝试重新部署它),然后在此目录中添加了一个新的war( appmon-qa.war
)。 I then ran the Tomcat startup script and saw deployment errors referencing the "old" appdata
WAR. 然后,我运行了Tomcat启动脚本,并看到了引用“旧”
appdata
WAR的部署错误。 I poked around and saw a folder with that name located at ${TOMCAT.HOME}/work/Catalina/localhost/appdata
and I deleted it (again, just to prevent Tomcat from re-deploying it). 我捅了一下,看到一个名为
${TOMCAT.HOME}/work/Catalina/localhost/appdata
的文件夹,我将其删除(再次,只是为了防止Tomcat重新部署它)。 I then re-ran the startup scripts and am seeing this in the catalina log: 然后我重新运行启动脚本,并在catalina日志中看到这个:
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Program Files\Apache\apache-tomcat-6.0.35\webapps\appdata does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4320)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4489)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
...rest of stacktrace omitted for brevity
Jun 7, 2012 11:35:27 AM org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
Jun 7, 2012 11:35:27 AM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Jun 7, 2012 11:35:27 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/appdata] startup failed due to previous errors
Jun 7, 2012 11:35:27 AM org.apache.catalina.core.StandardContext stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/appdata] has not been started
Jun 7, 2012 11:35:27 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive appmon-qa.war
Jun 7, 2012 11:35:28 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jun 7, 2012 11:35:28 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/appmon-qa] startup failed due to previous errors
I assume that my oh-so-perfectly-written appmon-qa.war
app is failing to deploy because of some ghost reference to this old appdata.war
app. 我认为我的哦 - 如此完美编写的
appmon-qa.war
应用程序未能部署,因为有一些鬼引用这个旧的appdata.war
应用程序。 If so, do I (properly) undeploy or delete it from Tomcat altogether so that it doesn't cause problems for my new app? 如果是这样,我是否(正确)取消部署或完全从Tomcat中删除它,以免它对我的新应用程序造成问题?
Otherwise, if this log output indicates that there is something wrong with appmon-qa.war
itself, then where do I start debugging? 否则,如果此日志输出表明
appmon-qa.war
本身有问题,那么我在哪里开始调试? Usually these "failed due to previous errors" output also includes a reason or source of what the errors are; 通常这些“因先前错误而失败”的输出也包括错误的原因或来源; this output is pretty undescriptive and vague.
这个输出非常简洁,含糊不清。 Thanks in advance!
提前致谢!
查看${TOMCAT.HOME}/conf/Catalina/localhost/appdata.xml
并删除它(如果存在)。
I had this same error (Document base ... does not exist or is not a readable directory). 我有同样的错误(文档库...不存在或不是可读目录)。 The easy solution was to re-install Tomcat over the existing one (ignore the warning "cannot install service" because it is already there).
简单的解决方案是在现有的Tomcat上重新安装Tomcat(忽略警告“无法安装服务”,因为它已经存在)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.