[jboss-jira] [JBoss JIRA] Commented: (JBAS-5671) Attempting to deploy a duplicate context removes existing servlet bindings

Adrian Brock (JIRA) jira-events at lists.jboss.org
Tue Jun 24 11:38:38 EDT 2008


    [ http://jira.jboss.com/jira/browse/JBAS-5671?page=comments#action_12418753 ] 
            
Adrian Brock commented on JBAS-5671:
------------------------------------

NOTE: In jboss-head, I've fixed the RootContextUnitTestCase to correctly take account of the default root context,
i.e. I stop it while running these tests.

You should replace step (3) with something like:
cp testsuite/output/lib/root-context.war $JBOSS_DEPLOY_FOLDER

> Attempting to deploy a duplicate context removes existing servlet bindings
> --------------------------------------------------------------------------
>
>                 Key: JBAS-5671
>                 URL: http://jira.jboss.com/jira/browse/JBAS-5671
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Web (Tomcat) service
>            Reporter: Adrian Brock
>         Assigned To: Remy Maucherat
>             Fix For: JBossAS-5.0.0.CR1
>
>
> In jboss by default there is a root Tomcat context supplied by deploy/ROOT.war
> This jsp page can be accessed using http://localhost:8080
> If you attempt to deploy another war in the same context it correctly gives an error message
> 11:53:40,865 INFO  [TomcatDeployment] deploy, ctxPath=/, vfsUrl=
> 11:53:40,889 ERROR [BaseModelMBean] Exception invoking method addChild
> java.lang.IllegalArgumentException: addChild:  Child name '' is not unique
>         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
>         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:780)
>         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>         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:585)
>         at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
>         at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
>         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
>         at org.apache.catalina.core.StandardContext.init(StandardContext.java:5384)
>         at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:344)
>         at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:139)
>         at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:431)
>         at org.jboss.web.deployers.WebModule.startModule(WebModule.java:112)
>         at org.jboss.web.deployers.WebModule.start(WebModule.java:90)
> But it also removes the servlet bindings for the ROOT.war,
> To reproduce:
> 1) Start jboss
> 2) Access http://localhost:8080 - gives a jsp page
> 3) In the testsuite, run ./build.sh one-test -Dtest=org.jboss.test.web.test.RootContextUnitTestCase
> 4) Refresh the page (make sure to flush the web browser cache)
> If you look at Tomcat's JSR77 mbeans before and after, you'll see that the web module for localhost/ still exists,
> but the servlet bindings have disappeared.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list