0 Replies Latest reply on Jun 7, 2009 8:21 AM by Peter Irmstadt

    Setting up VirtualHosts

    Peter Irmstadt Newbie


      I have a Debian Lenny root server running JBoss 4.2.3.GA default installation.

      I have a few Seam applications (currently only two) that I want to deploy to the server. Both applications should be deployed as http://app1.my-domain.com and http://app2.my-domain.com. I first thought about using a transparent Proxy but then heard about the VirtualHost feature of JBoss. I tried to figure it out on my own but currently am stuck and so hope you can help me:

      I first want to deploy one Seam application. The application is deployed as an EAR and currently accessible using http://serverip:8080/myApp.

      Before changing this application I changed the /../jboss/server/default/deploy/jboss-web.deployer/server.xml and added another section just below the existing one (server localhost).

      <Host name="app1.my-domain.com" autoDeploy="false" deployOnStartup="true" deployXML="true">
       <Valve className="org.apache.catalina.valves.AccessLogValve"
       prefix="vhost1" suffix=".log" pattern="common"
       <DefaultContext cookies="true" crossContext="true" override="true"/>

      Then I edited the jboss-web.xml file under myApp.ear/myApp.war/WEB-INF/ and changed it from

       <class-loading java2ClassLoadingCompliance="false">



      The application is nevertheless deployed to http://app1.my-domain.com/myApp/ but doesn't work even there properly. When trying to access the application the following error is thrown and I am redirected to my applications error page:

      14:14:56,676 WARN [SeamPhaseListener] uncaught exception, passing to exception handler
      java.lang.IllegalStateException: No active application scope

      Additionally the whole RichFaces theming (on the error page) doesn't work.

      What was my mistake? What can I do to correctly deploy the application to the second host 'app1.my-domain.com'?

      Thank you in advance!