Hi,

I'm experiencing problems w/Tomcat4.0.3 when using the Resources tag
in the server.xml tag. I have a simple context like this one:

<Context path="/ve" docBase="c:/ve">
  <Resources cached="false"/>
</Context>

When starting Tomcat I get the following error:

ERROR reading C:\tomcat-4.0.3\conf\server.xml
At Line 204 /Server/Service/Engine/Host/Context/Resources/

Catalina.start: InvocationTargetException
java.lang.IllegalArgumentException: Document base C:\tomcat-4.0.3\c:\ve
does not exist or is not a readable directory
        at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.jav
a:187)
        at
org.apache.catalina.core.StandardContext.setResources(StandardContext.ja
va:1107)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.util.xml.AddChild.end(XmlMapper.java:811)
        at
org.apache.catalina.util.xml.XmlMapper.matchEnd(XmlMapper.java:419)
...
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:253)
        at
org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:228)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:725)
...


Debugging the code, it seems that while parsing the server.xml
a premature call to the StandardContext.getBasePath() method yields
the incorrect base path "${CATALINA_HOME}c:/ve" instead of the expected
"c:/ve". This appears to happen because the StandardContext's parent
member is still set to null, because the parsing has not completed yet,
and it doesn't point to its parent Host yet.

Could this mean that a "Resources" component can never be specified
for WebApps not residing inside the Tomcat directory?

Any ideas?

Thanks,
-
Jesus Lopez
[EMAIL PROTECTED]

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to