2 Replies Latest reply on Jan 22, 2009 1:22 PM by Scott Stark

    Multiple virtual hosts with root context broken?

    Scy Newbie


      First off, I'll note that this problem has already been documented here without resolution: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=121311. Essentially, it seems that stricter checking in JBoss 5 has made it impossible to deploy 2 webapps to the root context even if they are configured to run under different virtual hosts.

      In jboss-web.xml:



      In server.xml:
      <Engine .....>
       <Host name="app1.host.com"/>
       <Host name="app2.host.com"/>

      The exception on deploying the second app is as follows:
      org.jboss.deployers.spi.DeploymentException: Error deploying: jboss.web.deployment:war=/
       at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentExcept
      Caused by: java.lang.IllegalStateException: jboss.web.deployment:war=/ is already installed.
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:716)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
       at org.jboss.system.ServiceController.doInstall(ServiceController.java:670)

      This is a show-stopper for me - these apps need to run under the root context, as they have been doing since JBoss 2. This should not cause conflict, since they should run under different virtual hosts.

      Any help would be most appreciated - I'm unable to proceed with JBoss 5 without resolving this.


      PS I notice application.xml in my EAR doesn't seem to be read anymore, so I assume one can no longer set the <context-root> there, but must now do it in jboss-web.xml?