tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "McEahern, Mark S" <mceah...@mail.slh.wisc.edu>
Subject RE: Deploying to a subfolder
Date Fri, 03 Oct 2008 19:44:50 GMT
Mark Thomas wrote:
> That is the wrong docBase so the error makes sense but it 
> should have been converted to ...\apps#myapp

What's interesting is that the automatic deployment process takes the
war file that I place in webapps/apps#myapp.war and creates a
corresponding file in this folder:

  C:\Program Files\Apache Software Foundation\Tomcat
6.0\conf\Catalina\localhost

named:

  apps#myapp.xml

with contents that match the META-INF/context.xml file in the .war:

  <?xml version="1.0" encoding="UTF-8"?>
  <Context reloadable="true" debug="true" allowLinking="true">
    <Valve className="org.apache.catalina.valves.RemoteHostValve"
allow="[snip]"/>
    <Resource [snip]/>
  </Context>

> What is the error message when Tomcat starts and deployment fails.

>From catalina.log:

Oct 3, 2008 2:36:59 PM org.apache.catalina.core.StandardContext
resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Program
Files\Apache Software Foundation\Tomcat 6.0\webapps\apps\myapp does not
exist or is not a readable directory
	at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.jav
a:141)
	at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.
java:3957)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4126
)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va:791)
	at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
	at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
	at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:
627)
	at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java
:553)
	at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
	at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
	at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:31
1)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:117)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
	at
org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	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:578)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Oct 3, 2008 2:36:59 PM org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
Oct 3, 2008 2:36:59 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Oct 3, 2008 2:36:59 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/apps/myapp] startup failed due to previous errors
Oct 3, 2008 2:36:59 PM org.apache.catalina.core.StandardContext stop
INFO: Container
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/apps/mya
pp] has not been started
Oct 3, 2008 2:36:59 PM org.apache.catalina.startup.HostConfig deployWAR

> This works for me, even with a space in the install path.
> 
> Are you sure you are using 6.0.18?

Yes.  Here's the information from the manager application:

Server Information
Tomcat Version:  Apache Tomcat/6.0.18
JVM Version:  1.6.0_06-b02
JVM Vendor:  Sun Microsystems Inc.
OS Name:  Windows XP
OS Version:  5.1
OS Architecture:  x86

> Also, is there a Context element defined anywhere for this 
> web app and if so, what is it?

The context inside of the .war file (/META-INF/context.xml) as well as
the resulting apps#myapp.xml in:

  C:\Program Files\Apache Software Foundation\Tomcat
6.0\conf\Catalina\localhost

They match and they both look like this:

  <?xml version="1.0" encoding="UTF-8"?>
  <Context reloadable="true" debug="true" allowLinking="true">
    <Valve className="org.apache.catalina.valves.RemoteHostValve"
allow="[snip]"/>
    <Resource [snip]/>
  </Context>

Thanks,

// m


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


Mime
View raw message