1 Reply Latest reply on Nov 26, 2004 2:34 PM by titom

    war interaction and virtual hosting

    titom

      Hi,

      I am running under JBoss 4.0.0.

      My application is packaged as an ear which contains two war. The first war contains common JSP pages, servlets, CSS. The second one contains the real application content that refers to the first one. Since a JBoss instance could host several similar ear , I have to restrict the content of one ear in one virtual host.

      To do that, I had an < host > entry in servler.xml (in jbossweb-tomcat50.sar folder), I specify the same virtual host in jboss-web.xml of the two war files and a different context path. I replicate the same context paths in the application.xml file of the ear. Finally I modify my etc/hosts file to include my virtual host.

      I've got the following error while deploying:

      11:26:42,380 ERROR [BaseModelMBean] Exception invoking method addChild
      java.lang.IllegalArgumentException: addChild: Child name 'w00357.example.com' is not unique
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:817)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
      at org.apache.catalina.core.StandardEngine.addChild(StandardEngine.java:318)
      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:324)

      Did I do something wrong?

      Thx.