4 Replies Latest reply on Feb 7, 2002 8:09 AM by statei

    Embeded Catalina & Apache

    statei

      Hi,
      I'm trying to integrate JBoss-Catalina with Apache (mod_webapp). OS Linux (RH 7.2), JBoss 2.4.4, Catalina 4.0.1 & Apache 1.3.19.
      I have the following httpd.conf
      ...
      LoadModule webapp_module modules/mod_webapp.so
      AddModule mod_webapp.c

      WebAppConnection warpConnection warp localhost:8008
      WebAppDeploy fp warpConnection /fp
      ...


      Here is jboss.jcml







      I was able to start JBoss with embeded Catalina, to deploy "fp" application (fp.war in $JBOSS_HOME/deploy) and to access my test servlet http://caaove07:8080/fp/servlet/Test

      When I started Apache I got a bunch o repeating errors:
      [14:53:09,343,EmbeddedCatalinaServiceSX] [org.apache.catalina.connector.warp.WarpConfigurationHandler] Error deploying web application "fp" under <http://CAAOVE07:80/fp/>
      [14:53:09,347,EmbeddedCatalinaServiceSX] [org.apache.catalina.connector.warp.WarpConfigurationHandler]
      java.lang.IllegalArgumentException: addChild: Child name 'caaove07' is not unique
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
      at org.apache.catalina.core.StandardEngine.addChild(StandardEngine.java:265)
      at org.apache.catalina.connector.warp.WarpConfigurationHandler.deploy(WarpConfigurationHandler.java:268)
      at org.apache.catalina.connector.warp.WarpConfigurationHandler.handle(WarpConfigurationHandler.java:117)
      at org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:189)
      at java.lang.Thread.run(Thread.java:484)


      Also I got maybe another pile of errors in Apache error.log:
      Cannot deploy application fp

      Maybe somebody can put me on the right direction.
      Thank you

      Iulian

        • 1. Re: Embeded Catalina & Apache
          jtwomey

          Yes, save some frustration and use mod_jk.

          See my FAQ:
          http://main.jboss.org/thread.jsp?forum=67&thread=4964

          And check this thread for a full story line ;).
          http://main.jboss.org/thread.jsp?forum=50&thread=1847&start=0&msRange=15

          JT

          • 2. Re: Embeded Catalina & Apache
            statei

            JT,

            I don't have any problem using ajp13 (mod_jk). The only bad thing is that you have to specify a hard mapping between context and physical path of the application in mod_jk.conf file. As long as embeded tomcat is not reading server.xml the only way to deploy an war (ear) is to use the autodeploy feature of jboss. The problem comes when you have to make a change, because you have to redeploy the entire thing which will end up in a different directory than the original one. In this case I have edit mod_jk.conf file and restart Apache which is annoying.

            Is there a workaround to force jboss to redeploy an application in the same directory?

            Is there any way to deploy an application in a different directory and manage it manualy (without autodeploy feature)?

            Thank you,
            Iulian

            • 3. Re: Embeded Catalina & Apache
              jtwomey

              What do mean "specify a hard mapping between context and physical path of the application" as being an issue?

              You have to specify the Tomcat host and deployed context name with either connector. If using mod_jk.conf is a problem just put that info in httpd.conf per the docs. you will still need your worker.properties file though and you can have more than one worker (Tomcat instance) per Apache server.

              I know of no work around yet yet.

              JT

              • 4. Re: Embeded Catalina & Apache
                statei

                Sorry JT, I made a mistake confusing Alias with JkMount. Thanks for your help.

                Iulian