You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by prashant sharma <pa...@gmail.com> on 2015/10/18 19:59:24 UTC
unable to specify new context in conf\Catalina\localhost
Hi,
This is my server details:-
Server InformationTomcat VersionJVM VersionJVM VendorOS NameOS VersionOS
ArchitectureHostnameIP AddressApache Tomcat/8.0.281.7.0_51-b13Oracle
CorporationMac OS X10.9.5x86_64
I have a web application(mytomcat-helloworld) in below
directory /Library/Tomcat/apache-tomcat-8.0.28/webapps/
Server.xml is also out of box.
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
I can access my application at below url:-
http://localhost:8080/mytomcat-helloworld/
Everything is fine till here.
I have now created a context xml in path
/Library/Tomcat/apache-tomcat-8.0.28/conf/Catalina/localhost/test.xml
as
<Context path = "/test" docBase="mytomcat-helloworld" >
</Context>
I was hoping to access the application with url:-
http://localhost:8080/test
But instead I get this error:-
18-Oct-2015 17:41:05.994 INFO [localhost-startStop-7]
org.apache.catalina.startup.HostConfig.deployDescriptor Deploying
configuration descriptor
/Library/Tomcat/apache-tomcat-8.0.28/conf/Catalina/localhost/test.xml
18-Oct-2015 17:41:05.995 WARNING [localhost-startStop-7]
org.apache.catalina.startup.HostConfig.deployDescriptor A docBase
/Library/Tomcat/apache-tomcat-8.0.28/webapps/mytomcat-helloworld inside the
host appBase has been specified, and will be ignored
18-Oct-2015 17:41:06.000 SEVERE [localhost-startStop-7]
org.apache.catalina.core.ContainerBase.addChildInternal
ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/test]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
at
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1780)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.catalina.LifecycleException: Failed to start
component [org.apache.catalina.webresources.StandardRoot@5334f6e8]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4854)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4984)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 10 more
Caused by: java.lang.IllegalArgumentException: The main resource set
specified [/Library/Tomcat/apache-tomcat-8.0.28/webapps/test] is not valid
at
org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:723)
at
org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:684)
at org.apache.catalina.ut
I have followed the specs given here:-
http://tomcat.apache.org/tomcat-8.0-doc/config/context.html#Defining_a_context
Note:- I get the error with this xml as well
<Context docBase="mytomcat-helloworld" >
</Context>
Re: unable to specify new context in conf\Catalina\localhost
Posted by Mark Eggers <it...@yahoo.com.INVALID>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 10/18/2015 10:59 AM, prashant sharma wrote:
> Hi, This is my server details:-
>
> Server InformationTomcat VersionJVM VersionJVM VendorOS NameOS
> VersionOS ArchitectureHostnameIP AddressApache
> Tomcat/8.0.281.7.0_51-b13Oracle CorporationMac OS X10.9.5x86_64 I
> have a web application(mytomcat-helloworld) in below directory
> /Library/Tomcat/apache-tomcat-8.0.28/webapps/ Server.xml is also
> out of box. <Host name="localhost" appBase="webapps"
> unpackWARs="true" autoDeploy="true">
>
> I can access my application at below url:-
> http://localhost:8080/mytomcat-helloworld/ Everything is fine till
> here.
>
> I have now created a context xml in path
> /Library/Tomcat/apache-tomcat-8.0.28/conf/Catalina/localhost/test.xml
>
>
as
> <Context path = "/test" docBase="mytomcat-helloworld" > </Context>
>
> I was hoping to access the application with url:-
> http://localhost:8080/test
>
> But instead I get this error:- 18-Oct-2015 17:41:05.994 INFO
> [localhost-startStop-7]
> org.apache.catalina.startup.HostConfig.deployDescriptor Deploying
> configuration descriptor
> /Library/Tomcat/apache-tomcat-8.0.28/conf/Catalina/localhost/test.xml
>
>
18-Oct-2015 17:41:05.995 WARNING [localhost-startStop-7]
> org.apache.catalina.startup.HostConfig.deployDescriptor A docBase
> /Library/Tomcat/apache-tomcat-8.0.28/webapps/mytomcat-helloworld
> inside the host appBase has been specified, and will be ignored
> 18-Oct-2015 17:41:06.000 SEVERE [localhost-startStop-7]
> org.apache.catalina.core.ContainerBase.addChildInternal
> ContainerBase.addChild: start:
> org.apache.catalina.LifecycleException: Failed to start component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/tes
t]]
>
>
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.
java:725)
>
>
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:70
1)
> at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
>
>
at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.jav
a:586)
>
>
at
> org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig
.java:1780)
>
>
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47
1)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.j
ava:1145)
>
>
at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
java:615)
>
>
at java.lang.Thread.run(Thread.java:744)
> Caused by: org.apache.catalina.LifecycleException: Failed to start
> component [org.apache.catalina.webresources.StandardRoot@5334f6e8]
> at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
>
>
at
> org.apache.catalina.core.StandardContext.resourcesStart(StandardContex
t.java:4854)
>
>
at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext
.java:4984)
>
>
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> ... 10 more Caused by: java.lang.IllegalArgumentException: The main
> resource set specified
> [/Library/Tomcat/apache-tomcat-8.0.28/webapps/test] is not valid
> at
> org.apache.catalina.webresources.StandardRoot.createMainResourceSet(St
andardRoot.java:723)
>
>
at
> org.apache.catalina.webresources.StandardRoot.startInternal(StandardRo
ot.java:684)
>
>
at org.apache.catalina.ut
>
>
> I have followed the specs given here:-
> http://tomcat.apache.org/tomcat-8.0-doc/config/context.html#Defining_a
_context
>
> Note:- I get the error with this xml as well <Context
> docBase="mytomcat-helloworld" > </Context>
>
Read:
http://tomcat.apache.org/tomcat-8.0-doc/config/context.html#Common_Attri
butes
And look at the entry concerning docBase
/mde/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEbBAEBAgAGBQJWI+CHAAoJEEFGbsYNeTwtIMwH9jlOV3831V1jtmyq0mtS93OT
Gmai8mMn7cT8VFiQLG/SGvS0nhGMHuPMjEesmrm/8TXK+0aqJObbT+BP6VsAxynm
cY/rw9JvywC4V16jWWUHbZc2wPCK1nxgtaGiD5SxmWNasIGBOy9WbnE8HDQEuSLH
SgLv/3mWs2ioc5uEbeCKb3wdtP5pswe/f5rcxyBFIqjHuTcjvwVKloEknS0E3HAs
HvPqwAtskX7ZwRLcHiOVoibQoSZuNuBlx/Ddu8vZ/+sSLn3i64F1kvNg8qkQFnei
XapJ7x27Zyvcv2mNqgxYEU1VhFvw1BzgiLsm6t29rLLBSjbKsmBGX4SELGKVDg==
=kt6v
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org