tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barnes, Mark (CORP)" <Mark.Bar...@ADP.com>
Subject Tomcat 8.0.14 - Host appBase not defaulting to "webapps" in $CATALINA_HOME ???
Date Thu, 20 Nov 2014 00:49:59 GMT
Hi, everyone -

Could someone please help me to get Tomcat 8.0.14 to find my web apps???

I am trying to upgrade a server from Tomcat 6.x to Tomcat 8.0.14 on Linux.  Tomcat does not
seem to build the path to the directory containing my web app correctly.

The server.xml I have been using for Tomcat 6.x is NOT working with Tomcat 8.0.14.  (Yes,
I know that it is not recommended to put Contexts in server.xml, but I have no choice about
that.)

I believe I am using appBase and docBase correctly, but when I start Tomcat I get a series
of exceptions that indicate that the directory cannot be found.  (Did things change between
Tomcat 6 and Tomcat 8?)

My $CATALINA_HOME is set to /usr/local/tomcat
/usr/local/tomcat is a symbolic link to /usr/local/tomcat8
/user/local/tomcat8 is a symbolic link to /usr/local/apache-tomcat-8.0.14

In my <Host> element in my server.xml, I have appBase=""

In my <Context> element in my <Host> element, I have docBase="ip"

My webapps directory is in $CATALINA_HOME: /usr/local/apache-tomcat-8.0.14/webapps

The directory "ip" containing the web app is in $CATALINA_HOME/webapps: /usr/local/apache-tomcat-8.0.14/webapps/ip

If appBase="" then it's supposed to default to $CATALINA_BASE/webapps, correct?  And if CATALINA_BASE
is not set, CATALINA_HOME is supposed to be used, no?  (I tried setting CATALINA_BASE to the
same value but that did not help.)

>From the 8.0.14 docs:

	appBase
	=======
	The Application Base directory for this virtual host. This is the pathname of a directory
that may contain
	web applications to be deployed on this virtual host. You may specify an absolute pathname,
or a pathname
	that is relative to the $CATALINA_BASE directory. See Automatic Application Deployment for
more information
	on automatic recognition and deployment of web applications. If not specified, the default
of webapps will
	be used.

For a given <Context>, if the docBase does not begin with "/", then the given value
is supposed to be relative to the appBase of the <Host>.  Am I right?

>From the 8.0.14 docs:

	docBase
	=======                
	The Document Base (also known as the Context Root) directory for this web application, or
the pathname to
	the web application archive file (if this web application is being executed directly from
the WAR file).
	You may specify an absolute pathname for this directory or WAR file, or a pathname that is
relative to the
	appBase directory of the owning Host.

	The value of this field must not be set unless the Context element is defined in server.xml
or the docBase
	is not located under the Host's appBase.

	If a symbolic link is used for docBase then changes to the symbolic link will only be effective
after a
	Tomcat restart or by undeploying and redeploying the context. A context reload is not sufficient.



Would someone please help me to understand what is going wrong?




Here is the stack trace from catalina.out:
=========================================

(NOTICE that is lists "/usr/local/tomcat8/ip" as the "main resource set"!!!  Why isn't "webapps"
in there???)

Nov 19, 2014 5:31:24 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to
start component [StandardEngine[Tomcat-Standalone].StandardHost[localhost].StandardContext[/ip]]
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:868)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat-Standalone].StandardHost[localhost].StandardContext[/ip]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        ... 6 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@7e40b4e2]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4900)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5029)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 6 more
Caused by: java.lang.IllegalArgumentException: The main resource set specified [/usr/local/tomcat8/ip]
is not valid
        at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:665)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 9 more



Thank you!
---Mark


----------------------------------------------------------------------
This message and any attachments are intended only for the use of the addressee and may contain
information that is privileged and confidential. If the reader of the message is not the intended
recipient or an authorized representative of the intended recipient, you are hereby notified
that any dissemination of this communication is strictly prohibited. If you have received
this communication in error, notify the sender immediately by return email and delete the
message and any attachments from your system.

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


Mime
View raw message