You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andy Ee <an...@sysatwork.com> on 2009/08/17 12:44:57 UTC

Multi-Level Context Paths

 

Dear All,

 

I need an urgent help, and I hope you will shed some light to it.

 

I have recently installed Apache Tomcat version 6.0.20. I copied my project
file (test.war) under /usr/local/apache-tomcat-6.0.20/webapps/ and it
deployed successfully. I can access the site via the URL of
<http://localhost:8080/ms3/> http://localhost:8080/test/. For this example,
the context path simply follows the filename of the war file.

 

There is a new requirement to setup multi-level context path as in I need
the URL to be  <http://localhost:8080/sg/server/test/>
http://localhost:8080/sg/server/test/ instead. I read up your site and
confirmed that adding Context path within server.xml is not recommended. I
went ahead to make a copy of the existing test.xml to sg#server#test.xml
under /usr/local/apache-tomcat-6.0.20/conf/Catalina/localhost/. Then I
restarted Tomcat.

 

The content of sg#server#test is:

 

<Context path="/test" debug="99" reloadable="true"

    antiJARLocking="true" antiResourceLocking="false">

 

    <!--Resource name="jdbc/test" auth="Container"
type="javax.sql.DataSource"

              maxActive="100" maxIdle="30" maxWait="10000"

              driverClassName="oracle.jdbc.driver.OracleDriver"

              username="MS3_STL" password="password"

              url="jdbc:oracle:thin:@192.168.0.37:1521:MS3"

              defaultAutoCommit="true" removeAbandoned="true"

              removeAbandonedTimeout="60" logAbandoned="true"/-->

</Context>

 

I restarted Tomcat but it gives errors under Catalina.out

 

Aug 17, 2009 5:54:43 PM org.apache.catalina.core.StandardContext
resourcesStart

SEVERE: Error starting static Resources

java.lang.IllegalArgumentException: Document base
/usr/local/apache-tomcat/webapps/sg#server#test does not exist or is not a
readable directory

        at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:14
2)

        at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java
:4048)

        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4217)

        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
91)

        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)

        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)

        at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)

        at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556
)

        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)

        at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)

        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)

        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)

        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:722)

        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

        at
org.apache.catalina.core.StandardService.start(StandardService.java:516)

        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

        at org.apache.catalina.startup.Catalina.start(Catalina.java:583)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)

        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)

        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Aug 17, 2009 5:54:43 PM org.apache.catalina.core.StandardContext start

SEVERE: Error in resourceStart()

Aug 17, 2009 5:54:43 PM org.apache.catalina.core.StandardContext start

SEVERE: Error getConfigured

Aug 17, 2009 5:54:43 PM org.apache.catalina.core.StandardContext start

SEVERE: Context [/sg/server/test] startup failed due to previous errors

Aug 17, 2009 5:54:43 PM org.apache.catalina.core.StandardContext stop

INFO: Container
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/sg/server/te
st] has not been started

Aug 17, 2009 5:54:43 PM org.apache.coyote.http11.Http11Protocol start

INFO: Starting Coyote HTTP/1.1 on http-6060

Aug 17, 2009 5:54:43 PM org.apache.coyote.http11.Http11Protocol start

INFO: Starting Coyote HTTP/1.1 on http-6443

Aug 17, 2009 5:54:43 PM org.apache.jk.common.ChannelSocket init

INFO: JK: ajp13 listening on /0.0.0.0:6009

Aug 17, 2009 5:54:43 PM org.apache.jk.server.JkMain start

INFO: Jk running ID=0 time=0/40  config=null

Aug 17, 2009 5:54:43 PM org.apache.catalina.startup.Catalina start

INFO: Server startup in 18859 ms

 

I have searched the Internet and couldn't find any posts with solutions to
such issue. It seems that setting up multi-level context path in Tomcat 6 is
not so straight-forwarded.

 

Please kindly help, thanks.

 

Best Regards,
Andy Ee



 

 


Re: Multi-Level Context Paths

Posted by Ognjen Blagojevic <og...@etf.bg.ac.rs>.
Andy Ee wrote:
> Other 2 questions:
> 1) Can I exclude the META-INF/context.xml file in the war file? This
> context.xml that will be copied to conf/Catalina/localhost after deployment,
> so that I can be sure this is not the problem to the setup of multi-level
> context path?

Yes, you can.


> 2) When we say renaming test.war into sg#server#test to achieve multi-level
> context path (http://localhost:8080/sg/server/test), are we talking about
> using the rename command in Solaris (mv test.war sg#server#test.war)?
> Or do I have to re-tar the project files into sg#server#test.war again?

It's the same thing.

Regards,
Ognjen


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Multi-Level Context Paths

Posted by Andy Ee <an...@sysatwork.com>.
Hi David,

I will try to remove that path attribute from the Context element.

Other 2 questions:
1) Can I exclude the META-INF/context.xml file in the war file? This
context.xml that will be copied to conf/Catalina/localhost after deployment,
so that I can be sure this is not the problem to the setup of multi-level
context path?

2) When we say renaming test.war into sg#server#test to achieve multi-level
context path (http://localhost:8080/sg/server/test), are we talking about
using the rename command in Solaris (mv test.war sg#server#test.war)?
Or do I have to re-tar the project files into sg#server#test.war again?


Thank you. 

Best Regards,
Andy Ee
 
 

-----Original Message-----
From: David Smith [mailto:dns4@cornell.edu] 
Sent: Monday, August 17, 2009 8:37 PM
To: Tomcat Users List
Subject: Re: Multi-Level Context Paths

Drop the path attribute from your <Context ... >...</Context>
definition.  The path should ideally be driven by the name of the war
file, not explicitly called out in config unless your webapp is outside
the webapps directory.

--David

Andy Ee wrote:
> Hi Mark,
>
> Before I prepare my .war file, there is an existing META-INF/context.xml
and
> the content is,
>
> <Context path="/test" debug="99" reloadable="true"
>     antiJARLocking="true" antiResourceLocking="false">
>
>     <!--Resource name="jdbc/moneysend" auth="Container"
> type="javax.sql.DataSource"
>               maxActive="100" maxIdle="30" maxWait="10000"
>               driverClassName="oracle.jdbc.driver.OracleDriver"
>               username="MS3_STL" password="password"
>               url="jdbc:oracle:thin:@192.168.0.37:1521:MS3"
>               defaultAutoCommit="true" removeAbandoned="true"
>               removeAbandonedTimeout="60" logAbandoned="true"/-->
> </Context>
>
>
> Should I remove the path parameter and prepare the war file again?
>
> With the path specified as /test, I am worried it will conflict how I
setup
> Multi-Level path.
>
> Best Regards,
> Andy Ee
>  
>  
>
> -----Original Message-----
> From: Mark Thomas [mailto:markt@apache.org] 
> Sent: Monday, August 17, 2009 7:04 PM
> To: Tomcat Users List
> Subject: Re: Multi-Level Context Paths
>
> Andy Ee wrote:
>   
>> There is a new requirement to setup multi-level context path as in I need
>> the URL to be  <http://localhost:8080/sg/server/test/>
>>     
>
> Remove all the old files you no longer want:
> $CATALINA_BASE/webapps/test.war
> $CATALINA_BASE/conf/Catalina/localhost/test.xml
> $CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml
>
> Rename your WAR to sg#server#test.war
>
> Place your renamed war in:
> $CATALINA_BASE/webapps/
>
> Any META-INF/context.xml will be extracted to:
> $CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml
>
>   
>> <Context path="/test" debug="99" reloadable="true"
>>     
>
> As stated in the docs for the context element, you should not specify
> the path attribute in this case.
>
>   
>> java.lang.IllegalArgumentException: Document base
>> /usr/local/apache-tomcat/webapps/sg#server#test does not exist or is not
a
>> readable directory
>>     
>
> If Tomcat finds:
> $CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml
>
> It expects to find a matching war
> $CATALINA_BASE/webapps/sg#server#test.war
> or directory
> $CATALINA_BASE/webapps/sg#server#test
>
> Mark
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Multi-Level Context Paths

Posted by David Smith <dn...@cornell.edu>.
Drop the path attribute from your <Context ... >...</Context>
definition.  The path should ideally be driven by the name of the war
file, not explicitly called out in config unless your webapp is outside
the webapps directory.

--David

Andy Ee wrote:
> Hi Mark,
>
> Before I prepare my .war file, there is an existing META-INF/context.xml and
> the content is,
>
> <Context path="/test" debug="99" reloadable="true"
>     antiJARLocking="true" antiResourceLocking="false">
>
>     <!--Resource name="jdbc/moneysend" auth="Container"
> type="javax.sql.DataSource"
>               maxActive="100" maxIdle="30" maxWait="10000"
>               driverClassName="oracle.jdbc.driver.OracleDriver"
>               username="MS3_STL" password="password"
>               url="jdbc:oracle:thin:@192.168.0.37:1521:MS3"
>               defaultAutoCommit="true" removeAbandoned="true"
>               removeAbandonedTimeout="60" logAbandoned="true"/-->
> </Context>
>
>
> Should I remove the path parameter and prepare the war file again?
>
> With the path specified as /test, I am worried it will conflict how I setup
> Multi-Level path.
>
> Best Regards,
> Andy Ee
>  
>  
>
> -----Original Message-----
> From: Mark Thomas [mailto:markt@apache.org] 
> Sent: Monday, August 17, 2009 7:04 PM
> To: Tomcat Users List
> Subject: Re: Multi-Level Context Paths
>
> Andy Ee wrote:
>   
>> There is a new requirement to setup multi-level context path as in I need
>> the URL to be  <http://localhost:8080/sg/server/test/>
>>     
>
> Remove all the old files you no longer want:
> $CATALINA_BASE/webapps/test.war
> $CATALINA_BASE/conf/Catalina/localhost/test.xml
> $CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml
>
> Rename your WAR to sg#server#test.war
>
> Place your renamed war in:
> $CATALINA_BASE/webapps/
>
> Any META-INF/context.xml will be extracted to:
> $CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml
>
>   
>> <Context path="/test" debug="99" reloadable="true"
>>     
>
> As stated in the docs for the context element, you should not specify
> the path attribute in this case.
>
>   
>> java.lang.IllegalArgumentException: Document base
>> /usr/local/apache-tomcat/webapps/sg#server#test does not exist or is not a
>> readable directory
>>     
>
> If Tomcat finds:
> $CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml
>
> It expects to find a matching war
> $CATALINA_BASE/webapps/sg#server#test.war
> or directory
> $CATALINA_BASE/webapps/sg#server#test
>
> Mark
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Multi-Level Context Paths

Posted by Andy Ee <an...@sysatwork.com>.
Hi Mark,

Before I prepare my .war file, there is an existing META-INF/context.xml and
the content is,

<Context path="/test" debug="99" reloadable="true"
    antiJARLocking="true" antiResourceLocking="false">

    <!--Resource name="jdbc/moneysend" auth="Container"
type="javax.sql.DataSource"
              maxActive="100" maxIdle="30" maxWait="10000"
              driverClassName="oracle.jdbc.driver.OracleDriver"
              username="MS3_STL" password="password"
              url="jdbc:oracle:thin:@192.168.0.37:1521:MS3"
              defaultAutoCommit="true" removeAbandoned="true"
              removeAbandonedTimeout="60" logAbandoned="true"/-->
</Context>


Should I remove the path parameter and prepare the war file again?

With the path specified as /test, I am worried it will conflict how I setup
Multi-Level path.

Best Regards,
Andy Ee
 
 

-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org] 
Sent: Monday, August 17, 2009 7:04 PM
To: Tomcat Users List
Subject: Re: Multi-Level Context Paths

Andy Ee wrote:
> There is a new requirement to setup multi-level context path as in I need
> the URL to be  <http://localhost:8080/sg/server/test/>

Remove all the old files you no longer want:
$CATALINA_BASE/webapps/test.war
$CATALINA_BASE/conf/Catalina/localhost/test.xml
$CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml

Rename your WAR to sg#server#test.war

Place your renamed war in:
$CATALINA_BASE/webapps/

Any META-INF/context.xml will be extracted to:
$CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml

> <Context path="/test" debug="99" reloadable="true"

As stated in the docs for the context element, you should not specify
the path attribute in this case.

> java.lang.IllegalArgumentException: Document base
> /usr/local/apache-tomcat/webapps/sg#server#test does not exist or is not a
> readable directory

If Tomcat finds:
$CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml

It expects to find a matching war
$CATALINA_BASE/webapps/sg#server#test.war
or directory
$CATALINA_BASE/webapps/sg#server#test

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Multi-Level Context Paths

Posted by Andy Ee <an...@sysatwork.com>.
Hi Mark,

Please see my responses below. Thanks.

Best Regards,
Andy Ee
 
 

-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org] 
Sent: Monday, August 17, 2009 7:04 PM
To: Tomcat Users List
Subject: Re: Multi-Level Context Paths

Andy Ee wrote:
> There is a new requirement to setup multi-level context path as in I need
> the URL to be  <http://localhost:8080/sg/server/test/>

Remove all the old files you no longer want:
$CATALINA_BASE/webapps/test.war
$CATALINA_BASE/conf/Catalina/localhost/test.xml
$CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml


Andy: Yes, I have deleted all the unnecessary war files as well as the xml
files.


Rename your WAR to sg#server#test.war

Place your renamed war in:
$CATALINA_BASE/webapps/

Any META-INF/context.xml will be extracted to:
$CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml

Andy: Yes, there is a file under my unpackaged sg#server#test.war. The file
is /usr/local/apache-tomcat/webapps/sg#server#test/META-INF/context.xml and
its content is:

<Context path="/test" debug="99" reloadable="true"
    antiJARLocking="true" antiResourceLocking="false">

    <!--Resource name="jdbc/moneysend" auth="Container"
type="javax.sql.DataSource"
              maxActive="100" maxIdle="30" maxWait="10000"
              driverClassName="oracle.jdbc.driver.OracleDriver"
              username="MS3_STL" password="password"
              url="jdbc:oracle:thin:@192.168.0.37:1521:MS3"
              defaultAutoCommit="true" removeAbandoned="true"
              removeAbandonedTimeout="60" logAbandoned="true"/-->
</Context>

I noticed that the context path is still /test. I have removed path="/test"
from the Context element. I done the same for
/usr/local/apache-tomcat/conf/Catalina/localhost/sg#server#test.xml and
restarted Tomcat.


Under catalina.log, I saw new errors:

INFO: Undeploying context [/sg/server/test]
Aug 17, 2009 7:30:09 PM org.apache.catalina.core.StandardContext
resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base
/usr/local/apache-tomcat/webapps/sg#server#test does not exist or is not a
readable directory
        at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:14
2)
        at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java
:4048)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4217)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
91)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
        at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
        at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556
)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
        at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1274)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:296)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
        at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:
1337)
        at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processC
hildren(ContainerBase.java:1601)
        at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processC
hildren(ContainerBase.java:1610)
        at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(Cont
ainerBase.java:1590)
        at java.lang.Thread.run(Thread.java:619)
Aug 17, 2009 7:30:09 PM org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
Aug 17, 2009 7:30:09 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Aug 17, 2009 7:30:09 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/sg/server/test] startup failed due to previous errors
Aug 17, 2009 7:30:09 PM org.apache.catalina.core.StandardContext stop
INFO: Container
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/sg/server/te
st] has not been started
Error occurred during initialization of VM
java.lang.Error: Properties init: Could not determine current working
directory.
        at java.lang.System.initProperties(Native Method)
        at java.lang.System.initializeSystemClass(System.java:1070)



> <Context path="/test" debug="99" reloadable="true"

As stated in the docs for the context element, you should not specify
the path attribute in this case.

> java.lang.IllegalArgumentException: Document base
> /usr/local/apache-tomcat/webapps/sg#server#test does not exist or is not a
> readable directory

If Tomcat finds:
$CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml

It expects to find a matching war
$CATALINA_BASE/webapps/sg#server#test.war
or directory
$CATALINA_BASE/webapps/sg#server#test

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Multi-Level Context Paths

Posted by Mark Thomas <ma...@apache.org>.
Andy Ee wrote:
> There is a new requirement to setup multi-level context path as in I need
> the URL to be  <http://localhost:8080/sg/server/test/>

Remove all the old files you no longer want:
$CATALINA_BASE/webapps/test.war
$CATALINA_BASE/conf/Catalina/localhost/test.xml
$CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml

Rename your WAR to sg#server#test.war

Place your renamed war in:
$CATALINA_BASE/webapps/

Any META-INF/context.xml will be extracted to:
$CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml

> <Context path="/test" debug="99" reloadable="true"

As stated in the docs for the context element, you should not specify
the path attribute in this case.

> java.lang.IllegalArgumentException: Document base
> /usr/local/apache-tomcat/webapps/sg#server#test does not exist or is not a
> readable directory

If Tomcat finds:
$CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml

It expects to find a matching war
$CATALINA_BASE/webapps/sg#server#test.war
or directory
$CATALINA_BASE/webapps/sg#server#test

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Multi-Level Context Paths

Posted by Ognjen Blagojevic <og...@etf.bg.ac.rs>.
Hi Andy,

Try to undeploy the old application. Rename the test.war to 
sg#server#test.war, and deploy it.

Regards,
Ognjen

Andy Ee wrote:
>  
> 
> Dear All,
> 
>  
> 
> I need an urgent help, and I hope you will shed some light to it.
> 
>  
> 
> I have recently installed Apache Tomcat version 6.0.20. I copied my project
> file (test.war) under /usr/local/apache-tomcat-6.0.20/webapps/ and it
> deployed successfully. I can access the site via the URL of
> <http://localhost:8080/ms3/> http://localhost:8080/test/. For this example,
> the context path simply follows the filename of the war file.
> 
>  
> 
> There is a new requirement to setup multi-level context path as in I need
> the URL to be  <http://localhost:8080/sg/server/test/>
> http://localhost:8080/sg/server/test/ instead. I read up your site and
> confirmed that adding Context path within server.xml is not recommended. I
> went ahead to make a copy of the existing test.xml to sg#server#test.xml
> under /usr/local/apache-tomcat-6.0.20/conf/Catalina/localhost/. Then I
> restarted Tomcat.
> 
>  
> 
> The content of sg#server#test is:
> 
>  
> 
> <Context path="/test" debug="99" reloadable="true"
> 
>     antiJARLocking="true" antiResourceLocking="false">
> 
>  
> 
>     <!--Resource name="jdbc/test" auth="Container"
> type="javax.sql.DataSource"
> 
>               maxActive="100" maxIdle="30" maxWait="10000"
> 
>               driverClassName="oracle.jdbc.driver.OracleDriver"
> 
>               username="MS3_STL" password="password"
> 
>               url="jdbc:oracle:thin:@192.168.0.37:1521:MS3"
> 
>               defaultAutoCommit="true" removeAbandoned="true"
> 
>               removeAbandonedTimeout="60" logAbandoned="true"/-->
> 
> </Context>
> 
>  
> 
> I restarted Tomcat but it gives errors under Catalina.out
> 
>  
> 
> Aug 17, 2009 5:54:43 PM org.apache.catalina.core.StandardContext
> resourcesStart
> 
> SEVERE: Error starting static Resources
> 
> java.lang.IllegalArgumentException: Document base
> /usr/local/apache-tomcat/webapps/sg#server#test does not exist or is not a
> readable directory
> 
>         at
> org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:14
> 2)
> 
>         at
> org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java
> :4048)
> 
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4217)
> 
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
> 91)
> 
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
> 
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
> 
>         at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
> 
>         at
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556
> )
> 
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
> 
>         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
> 
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
> 
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
> t.java:119)
> 
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
> 
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
> 
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> 
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
> 
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:516)
> 
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> 
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
> 
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
> 
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
> 
>         at java.lang.reflect.Method.invoke(Method.java:597)
> 
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
> 
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> 
> Aug 17, 2009 5:54:43 PM org.apache.catalina.core.StandardContext start
> 
> SEVERE: Error in resourceStart()
> 
> Aug 17, 2009 5:54:43 PM org.apache.catalina.core.StandardContext start
> 
> SEVERE: Error getConfigured
> 
> Aug 17, 2009 5:54:43 PM org.apache.catalina.core.StandardContext start
> 
> SEVERE: Context [/sg/server/test] startup failed due to previous errors
> 
> Aug 17, 2009 5:54:43 PM org.apache.catalina.core.StandardContext stop
> 
> INFO: Container
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/sg/server/te
> st] has not been started
> 
> Aug 17, 2009 5:54:43 PM org.apache.coyote.http11.Http11Protocol start
> 
> INFO: Starting Coyote HTTP/1.1 on http-6060
> 
> Aug 17, 2009 5:54:43 PM org.apache.coyote.http11.Http11Protocol start
> 
> INFO: Starting Coyote HTTP/1.1 on http-6443
> 
> Aug 17, 2009 5:54:43 PM org.apache.jk.common.ChannelSocket init
> 
> INFO: JK: ajp13 listening on /0.0.0.0:6009
> 
> Aug 17, 2009 5:54:43 PM org.apache.jk.server.JkMain start
> 
> INFO: Jk running ID=0 time=0/40  config=null
> 
> Aug 17, 2009 5:54:43 PM org.apache.catalina.startup.Catalina start
> 
> INFO: Server startup in 18859 ms
> 
>  
> 
> I have searched the Internet and couldn't find any posts with solutions to
> such issue. It seems that setting up multi-level context path in Tomcat 6 is
> not so straight-forwarded.
> 
>  
> 
> Please kindly help, thanks.
> 
>  
> 
> Best Regards,
> Andy Ee
> 
> 
> 
>  
> 
>  
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org