8 Replies Latest reply on Oct 14, 2007 11:23 AM by alamandrax

    Publish to JBoss AS 4.2.0.GA fails

    sg26565

      I'm trying to publish a simple web application to the JBoss server bundeled with RHDS. When I start the server I get a warning message and the web app is unavailable:

      21:01:13,071 INFO [TomcatDeployer] deploy, ctxPath=/Registration, warUrl=.../deploy/Registration.war/
      21:01:13,168 WARN [config] Unable to process deployment descriptor for context 'null'

      The same web app runs on tomcat without problems.

      I took a look into $RHDS_HOME/jboss-eap/jboss-as/server/default/deploy/Registration.war and it contains the folder structure of my web app but not files.

      I already deleted the server config in RHDS and re-created it, but the result is still the same (no files and warning message on startup). Am I doing something wrong here?

        • 1. Re: Publish to JBoss AS 4.2.0.GA fails
          maxandersen

          I think this is jboss as/configuration issue in your web.xml

          Here is my google search for it.
          (...)you need to customise the default WebRoot/WEB-INF/web.xml. This is what tells JBoss where to find the entry point for the web service -- the deployment descriptor. By default it points to a .jsp. If you forget and try to deploy it anyway, the deployment will work, a warning message : unable to process deployment descriptor for context null appears in the log(...)

          • 2. Re: Publish to JBoss AS 4.2.0.GA fails
            sg26565

            Maybe I wasn't clear enough. I have no problem running the web app on the JBoss server if I manually deploy it to $RHDS_HOME/jboss-eap/jboss-as/server/default/deploy/. My problem is that it dosn't work if I let RHDS deploy it to the integrated jboss-as (e.g. via Run As -> Run on Server).

            For testing purposes I have a very simple web app that consist of only two files: index.html and WEB-INF/web.xml

            <html>
             <body>
             <h1>Hello, World!</h1>
             </body>
            </html>
            <?xml version="1.0" encoding="UTF-8"?>
            <web-app id="WebApp_ID" version="2.4"
             xmlns="http://java.sun.com/xml/ns/j2ee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
             http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
            
             <display-name>Test-WEB</display-name>
             <welcome-file-list>
             <welcome-file>index.html</welcome-file>
             </welcome-file-list>
            </web-app>
            


            If I manually copy these two files to $RHDS_HOME/jboss-eap/jboss-as/server/default/deploy/Test-WEB everything is fine. However, if I use Publish from the Server view, then RHDS creates the WEB-INF directory but not any files. Even if I copy the files manually RHDS deletes them as soon as I modify one of them in RHDS. I think there is something wrong with the publish functionality. I'm not sure if that's a configuration issue or a bug.

            btw.: I'm running Fedora 7 and jdk1.5.0_13

            • 3. Re: Publish to JBoss AS 4.2.0.GA fails
              maxandersen

              any chance your workspace is on a different filesystem than your server ?

              if yes - then please report this as a bug!

              • 4. Re: Publish to JBoss AS 4.2.0.GA fails
                alamandrax

                I think I have a similar problem but with an installation of Tomcat 5.5

                1) I installed Tomcat 5.5 in C:\Program Files\Apache Software Foundation\Tomcat 5.5

                I then opened the Servers view in RHDS beta2, selected the new server option from the right-click menu and added the above server. I deployed my application to Tomcat using the Ant view in RHDS. I checked the %CATALINA_HOME%\webapps\ folder and I saw the war file for my application was correctly deployed to this folder.

                I came back to the Servers view in RHDS and hit the run button. The server starts up, but the application doesn't get deployed. This is the console output:

                Oct 14, 2007 3:32:12 PM org.apache.coyote.http11.Http11BaseProtocol init
                INFO: Initializing Coyote HTTP/1.1 on http-8080
                Oct 14, 2007 3:32:12 PM org.apache.catalina.startup.Catalina load
                INFO: Initialization processed in 924 ms
                Oct 14, 2007 3:32:12 PM org.apache.catalina.core.StandardService start
                INFO: Starting service Catalina
                Oct 14, 2007 3:32:12 PM org.apache.catalina.core.StandardEngine start
                INFO: Starting Servlet Engine: Apache Tomcat/5.5.25
                Oct 14, 2007 3:32:12 PM org.apache.catalina.core.StandardHost start
                INFO: XML validation disabled
                Oct 14, 2007 3:32:12 PM org.apache.coyote.http11.Http11BaseProtocol start
                INFO: Starting Coyote HTTP/1.1 on http-8080
                Oct 14, 2007 3:32:12 PM org.apache.jk.common.ChannelSocket init
                INFO: JK: ajp13 listening on /0.0.0.0:8009
                Oct 14, 2007 3:32:12 PM org.apache.jk.server.JkMain start
                INFO: Jk running ID=0 time=0/82 config=null
                Oct 14, 2007 3:32:12 PM org.apache.catalina.storeconfig.StoreLoader load
                INFO: Find registry server-registry.xml at classpath resource
                Oct 14, 2007 3:32:13 PM org.apache.catalina.startup.Catalina start
                INFO: Server startup in 875 ms


                As can be seen, my application's war file isn't being deployed. Running the same server from the command prompt produces this output:

                Oct 14, 2007 3:33:32 PM org.apache.coyote.http11.Http11BaseProtocol init
                INFO: Initializing Coyote HTTP/1.1 on http-8080
                Oct 14, 2007 3:33:32 PM org.apache.catalina.startup.Catalina load
                INFO: Initialization processed in 720 ms
                Oct 14, 2007 3:33:32 PM org.apache.catalina.core.StandardService start
                INFO: Starting service Catalina
                Oct 14, 2007 3:33:32 PM org.apache.catalina.core.StandardEngine start
                INFO: Starting Servlet Engine: Apache Tomcat/5.5.25
                Oct 14, 2007 3:33:32 PM org.apache.catalina.core.StandardHost start
                INFO: XML validation disabled
                Oct 14, 2007 3:33:33 PM org.apache.catalina.startup.HostConfig deployWAR
                INFO: Deploying web application archive myapplication.war
                15:33:38,359 INFO ContextLoader:174 - Root WebApplicationContext: initialization started
                15:33:38,366 INFO [/myapplication]:647 - Loading Spring root WebApplicationContext
                
                
                ... (a lot of output related to the deployment of myapplication)
                
                
                15:33:44,695 INFO ValidatorPlugIn:211 - Loading validation rules file from '/WEB-INF/validator-rules.xml'
                15:33:44,724 INFO ValidatorPlugIn:211 - Loading validation rules file from '/WEB-INF/validation.xml'
                Oct 14, 2007 3:33:45 PM org.apache.coyote.http11.Http11BaseProtocol start
                INFO: Starting Coyote HTTP/1.1 on http-8080
                Oct 14, 2007 3:33:45 PM org.apache.jk.common.ChannelSocket init
                INFO: JK: ajp13 listening on /0.0.0.0:8009
                Oct 14, 2007 3:33:45 PM org.apache.jk.server.JkMain start
                INFO: Jk running ID=0 time=0/31 config=null
                Oct 14, 2007 3:33:45 PM org.apache.catalina.storeconfig.StoreLoader load
                INFO: Find registry server-registry.xml at classpath resource
                Oct 14, 2007 3:33:45 PM org.apache.catalina.startup.Catalina start
                INFO: Server startup in 12778 ms


                I've deployed my applications, before, using the JBoss IDE and the server view and was able to run everything from within eclipse without having to visit the command prompt. Has the procedure to add the server to eclipse changed?

                Is this a bug?

                2) Adding the server to my servers view put a project folder Servers in my workspace with a "Tomcat v5.5 Server at localhost-config" folder and within this folder were the server.xml file and other configuration files related to Tomcat.

                Will modifying these files directly modify the config files in the %CATALINA_HOME%\conf\ folder?

                • 5. Re: Publish to JBoss AS 4.2.0.GA fails
                  maxandersen

                  tomcat deployment is the defaeult eclipse WTP implementation - so should not in any way be affected by JBossTools/JBossIDE

                  • 6. Re: Publish to JBoss AS 4.2.0.GA fails
                    alamandrax

                    I tested the server from my old JBoss IDE installation and the issue was identical to the one I described above. I guess it's a problem with my Tomcat installation. Thanks for the help! :)

                    • 7. Re: Publish to JBoss AS 4.2.0.GA fails
                      sg26565

                      My RHDS workspace is on /home/oli/workspaces/... and RHDS is installed in /opt/RedHatDeveloperStudio. /home and /opt are on different file systems. I copied RHDS to my home folder and re-created the jboss-as server config. With workspace and RHDS in the same file system, the deployment works without problems.

                      As you requested I will file a bug for this issue.

                      Thanks for the help!

                      • 8. Re: Publish to JBoss AS 4.2.0.GA fails
                        alamandrax

                        Turns out I was running the server from the workspace instead of letting eclipse take control of the tomcat installation directory.

                        Opening the server in eclipse and going through the Server Locations option helped.

                        My issue was solved.