12 Replies Latest reply on May 30, 2003 10:54 PM by jonlee

    Apache httpd 2.0.43, JBoss 3.2.1 w/ Tomcat 4.1.24

    epdv

      Hi,

      I've constantly problems with my configuration (Apache 2.0.43, JBoss 3.2.1 with Tomcat 4.1.24, W2k). My server.log seems to be o.k., but I even 'http://localhost:8080/jmx-console/' results in an error 404:

      HTTP Status 404 - /jmx-console/

      type Status report

      message /jmx-console/

      description The requested resource (/jmx-console/) is not available.
      Apache Tomcat/4.1.24-LE-jdk14


      Any idea? Any help apreciated. If You have any example configuration files (for JBoss and Apache httpd), I would like to get them (probably the JBoss team could provide such example files for the getting started documentation? A very small war in context /test with just a index.jsp [probably showing the current time] would exactly fit, too much would hide the important things).

      Kind regards

      Peter Nabbefeld

        • 1. Re: Apache httpd 2.0.43, JBoss 3.2.1 w/ Tomcat 4.1.24
          epdv

          Sorry, forgot the log files.

          Peter

          • 2. Re: Apache httpd 2.0.43, JBoss 3.2.1 w/ Tomcat 4.1.24
            jonlee

            Your log shows your access time as:
            127.0.0.1 - - [27/May/2003:14:55:03 1000] "GET /jmx-console/ HTTP/1.1" 500 866

            The start of deployment of the application does not begin until:
            2003-05-27 14:55:10,316 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/Programme/jboss-3.2.1_tomcat-4.1.24/server/default/deploy/jmx-console.war/


            The completion of deployment for jmx-console does not occur until:
            2003-05-27 14:55:13,391 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Watch URL for: file:/C:/Programme/jboss-3.2.1_tomcat-4.1.24/server/default/deploy/jmx-console.war/ -> file:/C:/Programme/jboss-3.2.1_tomcat-4.1.24/server/default/deploy/jmx-console.war/WEB-INF/web.xml

            It appears that you jumped the gun.

            • 3. Re: Apache httpd 2.0.43, JBoss 3.2.1 w/ Tomcat 4.1.24
              epdv

              Thank You, have now replaced error 500 with error 404:

              HTTP Status 404 - /jmx-console/

              type Status report

              message /jmx-console/

              description The requested resource (/jmx-console/) is not available.
              Apache Tomcat/4.1.24-LE-jdk14

              • 4. Re: Apache httpd 2.0.43, JBoss 3.2.1 w/ Tomcat 4.1.24
                jonlee

                For some reason, your distribution is missing the default web.xml file. This should reside in server/default/deploy/jbossweb-tomcat.sar. It is the default Tomcat mapping file. It is the file responsible for redirecting to a welcome file such as index.html, index.jsp or index.htm if the URI given points to a directory. If you don't have that file, you probably won't have any JSPs compiled either as it contains a whole mess of stuff controlling content, mime-types as well as servlet control.

                • 5. Re: Apache httpd 2.0.43, JBoss 3.2.1 w/ Tomcat 4.1.24
                  jonlee

                  BTW, the errors in your files are something like:
                  2003-05-27 15:53:10,430 INFO [org.jboss.web.localhost.Engine] ContextConfig[/invoker]: Missing default web.xml, using application web.xml only

                  • 6. Re: Apache httpd 2.0.43, JBoss 3.2.1 w/ Tomcat 4.1.24
                    epdv

                    It's funny - the web.xml is exactly in that place (C:\Programme\jboss-3.2.1_tomcat-4.1.24\server\default\deploy\jbossweb-tomcat.sar).

                    • 7. Re: Apache httpd 2.0.43, JBoss 3.2.1 w/ Tomcat 4.1.24
                      jonlee

                      Haven't encountered this problem before but it is definitely complaining that it doesn't have a default web.xml. Try putting a full URI to some real files:

                      e.g.

                      http://localhost:8080/jmx-console/index.jsp
                      http://localhost:8080/jmx-console/images/head_blue.gif

                      That should tell you if it can find the content, and know what to do with the content.

                      I'm going off-line so hopefully someone else will be able to help.

                      • 8. Re: Apache httpd 2.0.43, JBoss 3.2.1 w/ Tomcat 4.1.24
                        epdv

                        I've tried the links You supported, but the result is the same. BTW: I've looked for the missing web.xml files in the server log, they have nothing to do with tomcat; instead, the warnings are produced for every sar directory which contains war directories.

                        The problem seems to be based on wrong context initialization for the used directories. I've found messages like the following in server.log:

                        2003-05-27 15:53:05,523 DEBUG [org.jboss.management.j2ee.factory.DefaultManagedObjectFactoryMap] Failed to find factory for event: javax.management.Notification[source=jboss.system:service=JARDeployer,type=org.jboss.deployment.SubDeployer.start,sequenceNumber=48,timeStamp=1054043585513,message=null,userData=org.jboss.deployment.DeploymentInfo@c4a2247c { url=file:/C:/Programme/jboss-3.2.1_tomcat-4.1.24/server/default/deploy/jbossweb-tomcat.sar/tomcat-util.jar }
                        deployer: org.jboss.deployment.JARDeployer@1f26605
                        status: Starting
                        state: START_DEPLOYER
                        watch: file:/C:/Programme/jboss-3.2.1_tomcat-4.1.24/server/default/deploy/jbossweb-tomcat.sar/tomcat-util.jar
                        lastDeployed: 1054043584342
                        lastModified: 1054043584071
                        mbeans:
                        ]

                        Kind regards

                        Peter

                        • 9. Re: Apache httpd 2.0.43, JBoss 3.2.1 w/ Tomcat 4.1.24
                          epdv

                          Finally I've found out that the problem has been caused by the CatalinaBase attribute. Could anyone support more information on this attribute? I wanted to place my Tomcat-only wars in a /webapps directory, but that seemed to cause problems in JBoss.

                          BTW: The file jk2.properties has been searched for in /webapps/etc, although running on W2k. Is there possibly a problem with filepaths?

                          • 10. Re: Apache httpd 2.0.43, JBoss 3.2.1 w/ Tomcat 4.1.24
                            jonlee

                            In JBoss, WAR files must go in a JBoss deploy directory. This will deploy the application to the embedded Web Application Server - either Tomcat or Jetty normally, based on your distribution.

                            I'm not sure what you mean by Tomcat-only WAR files. JBoss itself does not run any web applications. Hope that helps. Also, Tomcat under JBoss does not unpack WAR files.

                            • 11. Re: Apache httpd 2.0.43, JBoss 3.2.1 w/ Tomcat 4.1.24
                              epdv

                              So, what is the CatalinaBase argument for? The "Getting Started" documentation states:

                              CatalinaBase, sets the value to use for the catalina.base System property. This is used to resolve relative paths. If not specified the CatalinaHome attribute value will be used.

                              When I set this argument, Tomcat unpacks any war in the given path - but then it needs a context to execute the application and can't execute the app.

                              • 12. Re: Apache httpd 2.0.43, JBoss 3.2.1 w/ Tomcat 4.1.24
                                jonlee

                                Sorry. We seem to be getting confused on terminology.

                                By unpack, I mean in the sense that a standalone Tomcat will take a WAR (say myapp.war) deployed into tomcat-distrib/webapps and unpack all the contents into a directory under tomcat-distrib/webapps (for example tomcat-distrib/webapps/myapp). I really mean unWAR the package. In JBoss, Tomcat behaviour is not to unWAR this.

                                Now, I haven't really played with the side of Tomcat with setting an overriding value for the $CATALINA_HOME and $CATALINA_BASE. To be honest, I'm not quite sure of the merits either.

                                But, I do note from experimentation that setting CATALINA_BASE defines where the work directories are created (as in Tomcat). And I get the same results as you. From the files I'm seeing created, the WEB-INF directories are created when content exists for the web application - unlike normal Tomcat operation, when the WARs are unpacked. It is also where the JSPs are compiled, as in normal Tomcat operation. Note, that no static content is created in the work directories and this is again like standard Tomcat operation.

                                From further experimentation, I note that the problem of running applications is rectified if I make CatalinaHome the same as CatalinaBase.
                                /java/jboss-3.2.0/server/default/test
                                /java/jboss-3.2.0/server/default/test

                                Creates the Tomcat work directories under /java/jboss-3.2.0/server/default/test and copies over the class and jar files of the respective web applications into the expected work directories and builds the JSPs on demand in the directories. No static content appears in the directories.

                                Hope that helps.