一尘不染

Tomcat 6拒绝有效的docBase

tomcat

这是我的webapp上下文文件,/ etc / tomcat6 / Catalina / localhost / ri.xml

<Context docBase="/home/bart/Dropbox/projects/RevoraIndieSite/webapp" reloadable="true">

</Context>

但是,Tomcat抱怨:

INFO: Deploying configuration descriptor ri.xml
28-Apr-2011 23:44:04 org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base /home/bart/Dropbox/projects/RevoraIndieSite/webapp does not exist or is not a readable directory
    at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142)
    at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4249)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4418)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1345)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
    at java.lang.Thread.run(Thread.java:636)
28-Apr-2011 23:44:04 org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
28-Apr-2011 23:44:04 org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
28-Apr-2011 23:44:04 org.apache.catalina.core.StandardContext start
SEVERE: Context [/ri] startup failed due to previous errors
28-Apr-2011 23:44:04 org.apache.catalina.core.StandardContext stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/ri] has not been started

但是该目录存在,并且每个人都可以读取。

bart@bart-laptop:~$ ls -l /home/bart/Dropbox/projects/RevoraIndieSite
total 36
drwxr-xr-x 3 bart bart 4096 2011-04-20 20:46 bin
drwxr-xr-x 3 bart bart 4096 2011-04-27 23:11 bin-tools
-rw-r--r-- 1 bart bart  971 2011-04-27 23:15 build.xml
drwxr-xr-x 4 bart bart 4096 2011-03-30 22:42 export
-rw-r--r-- 1 bart bart  290 2011-03-30 22:36 ivysettings.xml
-rw-r--r-- 1 bart bart 1214 2011-04-27 23:08 ivy.xml
drwxr-xr-x 4 bart bart 4096 2011-04-28 23:33 src
drwxr-xr-x 3 bart bart 4096 2011-04-27 22:09 src-tools
drwxr-xr-x 3 bart bart 4096 2011-02-27 17:33 webapp

这是Ubuntu 10.10存储库中的默认Tomcat 6安装,没有其他更改。


阅读 253

收藏
2020-06-16

共1个答案

一尘不染

webapp目录也需要写权限。此外,将这个目录的所有者设置为与运行tomcat实例的目录相同的一个好习惯(如果我没记错的话,它是ubuntu上的tomcat6用户),所以请尝试
chown -R tomcat6:tomcat6 webapps
或为其他人向webapps forlder提供写权限
chmod 766 webapps

2020-06-16