You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2015/01/19 20:33:33 UTC

[Bug 57467] New: Tomcat 8.0.14 - Using the Wrong Webapp Directory?

https://issues.apache.org/bugzilla/show_bug.cgi?id=57467

            Bug ID: 57467
           Summary: Tomcat 8.0.14 - Using the Wrong Webapp Directory?
           Product: Tomcat 8
           Version: 8.0.14
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: mark.barnes@adp.com

It looks to me like Tomcat 8.0.14 is trying to use the wrong directory when
trying to load a web app.

In my server.xml, in my <Host> element, I have name='wapp1_001" and appBase=””.
 In my <Context> element, I have path=”/src” and docBase=”webapps/src”

I would expect Tomcat to use $TOMCAT_HOME/webapps/src for the /src context, but
it's not.  It's trying to use $TOMCAT_HOME/src.  Why?

Both TOMCAT_HOME and CATALINA_HOME are set to /usr/local/tomcat, which is a
symbolic link to /usr/local/tomcat8, which is a symbolic to
/usr/local/apache-tomcat-8.0.14.

When I use appBase="/usr/local/tomcat/webapps" things work just fine.  Notice
that "webapps" is now in both appBase and docBase.

When I use appBase="webapps" things work just fine as well.  Notice that
"webapps" is redundant again.

Buth when I use appBase="" it doesn't work.

The Tomcat 8 configuration docs seem to say that the default for appBase is the
"webapps" sub-directory of $TOMCAT_HOME, as it always has been.

I have had this same problem on both Windows 7 and Ubuntu Linux.  JDK is
1.8.0_25 (64-bit) in both cases

Am I missing something here?  Did somethning change between Tomcat 6 and Tomcat
8.  Or is this a bug in Tomcat 8.0.14?




Here is the stack traceback:

java.util.concurrent.ExecutionException:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Tomcat-Standalone].StandardHost[wapp1_001].StandardContext[/src]]
  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[wapp1_001].StandardContext[/src]]
  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@6672f1f2]
  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/apache-tomcat-8.0.14/src] 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
01-19-2015 14:16:03.524 A child container failed during start

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 57467] Tomcat 8.0.14 - Using the Wrong Webapp Directory?

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57467

--- Comment #2 from Mark Barnes <ma...@adp.com> ---
It works for Tomcat 6 and it worked for Tomcat 5.  We're upgrading from 6.0.20
to 8.0.14.

The configuration reference does say this:

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.

I get that it does NOT say that appBase="" is the same as not specifying
appBase at all.  In fact, it doesn't say what appBase="" means.  It doesn't say
it's invalid, either.  So "" is not relative $CATALINA_BASE ???


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.

Oh, well...

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 57467] Tomcat 8.0.14 - Using the Wrong Webapp Directory?

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57467

Chuck Caldarale <ch...@unisys.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Chuck Caldarale <ch...@unisys.com> ---
(In reply to Mark Barnes from comment #0)
> In my server.xml, in my <Host> element, I have name='wapp1_001" and
> appBase=””.

Invalid right off the bat.

> Buth when I use appBase="" it doesn't work.

Nor should it, since that's an invalid configuration.

Bugzilla is not a support forum; post your configuration issues on the Tomcat
users' mailing list.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org