You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jeroen Breedveld <je...@x-hive.com> on 2003/07/03 10:58:17 UTC

Problem deploying webapp with context file

Hi all,

I'm trying to deploy an application by copying a file called myapp.xml
containing the context description below to tomcat's webapp directory:

<Context path="myapp"
      docBase="C:/cvs/demos/myapp/deploy"
        debug="0" 
   privileged="true">

  <Logger className="org.apache.catalina.logger.FileLogger" 
              debug="0" 
          directory="logs"
             prefix="myapp_log." 
             suffix=".txt"
          timestamp="true" 
          verbosity="1"/>

</Context>

Tomcat automatically detects the addition and tries to load the new
context but then it throws several exceptions. Here are some fragments
from the exceptions: 

3-jul-2003 10:47:57 org.apache.commons.digester.Digester endElement
SEVERE: End event threw exception
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:2
52)
... 

Caused by: java.lang.IllegalArgumentException: Invalid context path:
myapp
        at
org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeplo
yer.java:692)

....

2003-07-03 10:47:57 HostConfig[localhost] Error deploying configuration
descriptor myapp.xml
java.io.IOException: java.lang.IllegalArgumentException: Invalid context
path: myapp
	at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeploy
er.java:391)
	at
org.apache.catalina.core.StandardHost.install(StandardHost.java:803)
	at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java
:442)
	at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:399)

If I change the "path" attribute to this: path="" (the ROOT context) it
does work! Can someone please tell me wat is causing this? 

Thanks and regards,

Jeroen

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


RE: Problem deploying webapp with context file

Posted by Jeroen Breedveld <je...@x-hive.com>.
 || -----Original Message-----
 || From: Antonio Fiol Bonnín [mailto:fiol.bonnin@terra.es] 
 || Sent: donderdag 3 juli 2003 11:08
 || To: Tomcat Users List
 || Subject: Re: Problem deploying webapp with context file
 || 
 || try path="/myapp"

That did it, thanks!

regards,

Jeroen


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


Re: Problem deploying webapp with context file

Posted by Antonio Fiol Bonnín <fi...@terra.es>.
try path="/myapp"


Jeroen Breedveld wrote:

>Hi all,
>
>I'm trying to deploy an application by copying a file called myapp.xml
>containing the context description below to tomcat's webapp directory:
>
><Context path="myapp"
>      docBase="C:/cvs/demos/myapp/deploy"
>        debug="0" 
>   privileged="true">
>
>  <Logger className="org.apache.catalina.logger.FileLogger" 
>              debug="0" 
>          directory="logs"
>             prefix="myapp_log." 
>             suffix=".txt"
>          timestamp="true" 
>          verbosity="1"/>
>
></Context>
>
>Tomcat automatically detects the addition and tries to load the new
>context but then it throws several exceptions. Here are some fragments
>from the exceptions: 
>
>3-jul-2003 10:47:57 org.apache.commons.digester.Digester endElement
>SEVERE: End event threw exception
>java.lang.reflect.InvocationTargetException
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
>a:39)
>        at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
>Impl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:324)
>        at
>org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:2
>52)
>... 
>
>Caused by: java.lang.IllegalArgumentException: Invalid context path:
>myapp
>        at
>org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeplo
>yer.java:692)
>
>....
>
>2003-07-03 10:47:57 HostConfig[localhost] Error deploying configuration
>descriptor myapp.xml
>java.io.IOException: java.lang.IllegalArgumentException: Invalid context
>path: myapp
>	at
>org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeploy
>er.java:391)
>	at
>org.apache.catalina.core.StandardHost.install(StandardHost.java:803)
>	at
>org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java
>:442)
>	at
>org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:399)
>
>If I change the "path" attribute to this: path="" (the ROOT context) it
>does work! Can someone please tell me wat is causing this? 
>
>Thanks and regards,
>
>Jeroen
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>  
>