You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jonathan Eric Miller <je...@uchicago.edu> on 2004/09/01 20:19:48 UTC

In Tomcat 4.0 and 5.0, I had the following in my server.xml file.

<Context path="" docBase="ROOT" debug="0" reloadable="true"/>

However, if I try to use this in Tomcat 5.5, I receive the following error 
in catalina.out. Does anyone know if I need to change something to get it to 
work with Tomcat 5.5, or, is this a bug?

Also, is ROOT a special case? I don't see where the ROOT directory is being 
assigned the the root path in any of the configuration files.

Sep 1, 2004 11:31:36 AM org.apache.catalina.startup.HostConfig 
deployDirectory
SEVERE: Error deploying web application directory ROOT
java.lang.IllegalArgumentException: addChild:  Child name '' is not unique
        at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:749)
        at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
        at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
        at 
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:880)
        at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:843)
        at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
        at 
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1063)
        at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
        at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
        at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003)
        at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:420)
        at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
        at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:1967)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:545)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:582)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)

Jon


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


Re: Posted by Peter Rossbach <pr...@objektpark.de>.
Remy Maucherat schrieb:

>On Thu, 02 Sep 2004 10:04:13 +0200, Peter Rossbach <pr...@objektpark.de> wrote:
>  
>
>>Hello Remy,
>>
>>ok, when we not want that Context placed at server.xml  than we remove
>>the configuration
>>elements at Catalina.createStartDigester.
>>    
>>
>
>Ok, but:
>- the webapp will not be handled by hot deployment at all
>- this can indeed be used for a secure setup (as no other descriptors
>will be read for
>  that context)
>- this Context element will be externalized as soon as the admin webapp is used
>
>  
>
OK,

I hope I can solve the store server.xml/context.xml functionality with 
my currently develop
config package. I only store the app context as separate file as 
StandardContext.getStoreConfig != null.

thanks,
peter



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


Re: Posted by Remy Maucherat <re...@gmail.com>.
On Thu, 02 Sep 2004 10:04:13 +0200, Peter Rossbach <pr...@objektpark.de> wrote:
> Hello Remy,
> 
> ok, when we not want that Context placed at server.xml  than we remove
> the configuration
> elements at Catalina.createStartDigester.

Ok, but:
- the webapp will not be handled by hot deployment at all
- this can indeed be used for a secure setup (as no other descriptors
will be read for
  that context)
- this Context element will be externalized as soon as the admin webapp is used

-- 
xxxxxxxxxxxxxxxxxxxxxxxxx
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
xxxxxxxxxxxxxxxxxxxxxxxxx

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


Re: Posted by Peter Rossbach <pr...@objektpark.de>.
Hello Remy,

ok, when we not want that Context placed at server.xml  than we remove 
the configuration
elements at Catalina.createStartDigester. We can also removed the 
DefaultContext digester configuration.

-- :L 320ff
        // TODO Delete this DefaultContext Handling Class not existing 
at 5.5.0
        digester.addRuleSet(new 
ContextRuleSet("Server/Service/Engine/Default"));
        digester.addRuleSet(new 
NamingRuleSet("Server/Service/Engine/DefaultContext/"));
        digester.addRuleSet(new 
ContextRuleSet("Server/Service/Engine/Host/Default"));
        digester.addRuleSet(new 
NamingRuleSet("Server/Service/Engine/Host/DefaultContext/"));
        // -- END
       ...
        digester.addRuleSet(new 
NamingRuleSet("Server/Service/Engine/Host/Context/"));
--

But your are sure that we goes this radical way? I thing that at very 
secure system without any
autoreloading features the server.xml Context configuration is a usefull 
option.

Comments ?

regards
Peter

Remy Maucherat schrieb:

>On Wed, 1 Sep 2004 13:19:48 -0500, Jonathan Eric Miller
><je...@uchicago.edu> wrote:
>  
>
>>In Tomcat 4.0 and 5.0, I had the following in my server.xml file.
>>
>><Context path="" docBase="ROOT" debug="0" reloadable="true"/>
>>
>>However, if I try to use this in Tomcat 5.5, I receive the following error
>>in catalina.out. Does anyone know if I need to change something to get it to
>>work with Tomcat 5.5, or, is this a bug?
>>
>>Also, is ROOT a special case? I don't see where the ROOT directory is being
>>assigned the the root path in any of the configuration files.
>>
>>Sep 1, 2004 11:31:36 AM org.apache.catalina.startup.HostConfig
>>deployDirectory
>>SEVERE: Error deploying web application directory ROOT
>>java.lang.IllegalArgumentException: addChild:  Child name '' is not unique
>>        at
>>org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:749)
>>        at
>>org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>>        at
>>org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
>>        at
>>org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:880)
>>        at
>>org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:843)
>>        at
>>org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
>>        at
>>org.apache.catalina.startup.HostConfig.start(HostConfig.java:1063)
>>        at
>>org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>>        at
>>org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>>        at
>>org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
>>        at
>>org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>>        at
>>org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003)
>>        at
>>org.apache.catalina.core.StandardEngine.start(StandardEngine.java:420)
>>        at
>>org.apache.catalina.core.StandardService.start(StandardService.java:450)
>>        at
>>org.apache.catalina.core.StandardServer.start(StandardServer.java:1967)
>>        at org.apache.catalina.startup.Catalina.start(Catalina.java:545)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>        at
>>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:582)
>>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
>>    
>>
>
>The auto deployer doesn't check if the context exists before trying to
>deploy. It's that defining contexts in server.xml is deprecated. I
>think I'll just remove it, which will fix the problem.
>
>Solution: Don't put any Context elements in server.xml
>
>  
>


-- 
J2EE Systemarchitekt und Tomcat Experte

http://objektpark.de/
http://www.webapp.de/

Am Josephsschacht 72, 44879 Bochum, Deutschland
Telefon:  (49) 234 9413228
Mobil:    (49) 175 1660884
E-Mail:  pr@objektpark.de




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


Re: Posted by Remy Maucherat <re...@gmail.com>.
On Wed, 1 Sep 2004 13:19:48 -0500, Jonathan Eric Miller
<je...@uchicago.edu> wrote:
> In Tomcat 4.0 and 5.0, I had the following in my server.xml file.
> 
> <Context path="" docBase="ROOT" debug="0" reloadable="true"/>
> 
> However, if I try to use this in Tomcat 5.5, I receive the following error
> in catalina.out. Does anyone know if I need to change something to get it to
> work with Tomcat 5.5, or, is this a bug?
> 
> Also, is ROOT a special case? I don't see where the ROOT directory is being
> assigned the the root path in any of the configuration files.
> 
> Sep 1, 2004 11:31:36 AM org.apache.catalina.startup.HostConfig
> deployDirectory
> SEVERE: Error deploying web application directory ROOT
> java.lang.IllegalArgumentException: addChild:  Child name '' is not unique
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:749)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
>         at
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:880)
>         at
> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:843)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
>         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1063)
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003)
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:420)
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:450)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:1967)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:545)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:582)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)

The auto deployer doesn't check if the context exists before trying to
deploy. It's that defining contexts in server.xml is deprecated. I
think I'll just remove it, which will fix the problem.

Solution: Don't put any Context elements in server.xml

-- 
xxxxxxxxxxxxxxxxxxxxxxxxx
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
xxxxxxxxxxxxxxxxxxxxxxxxx

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