6 Replies Latest reply on Aug 12, 2011 11:31 AM by Karthee Kholi

    How to deploy a simple war file on JBOSS 7 ?

    Karthee Kholi Newbie

      I deployed a simple war file (Hello.war) which contains a simple index.jsp file successfully in JBOSS 5. I simply placed the war file in server\default\deploy

       

      and then went to localhost:8080/Hello/index.jsp and everything was fine.

       

      Similarly, for JBOSS 7, I deployed the war file in standalone standalone\deployments and started \bin\standalone.bat but localhost:8080/Hello/index.jsp does not display the file.

       

      What is the procedure to deploy a simple war file on JBOSS 7?

        • 1. Re: How to deploy a simple war file on JBOSS 7 ?
          jaikiran pai Master

          Are you deploying it in exploded form or in archive form. If you are using exploded form then you will also have to place a Hello.war.dodeploy marker file in JBOSS_HOME/standalone/deployments to trigger the deployment. If it's in archive form, then just placing it in JBOSS_HOME/standalone/deployments should work.

           

          What does the console log show when you start the server with your application?

          • 2. Re: How to deploy a simple war file on JBOSS 7 ?
            Karthee Kholi Newbie

            Hi Jai!

             

            Thanks for taking the time to respond. I really appreciate it.

             

            I am deploying it in the archive form. I just placed it in the standalone/deployments folder.

             

            The server is running fine but localhost:8080/Hello/index.jsp is not working.

             

            This is the console log:

             

            Calling C:\jboss-as-7.0.0.Final\jboss-as-7.0.0.Final\bin\standalone.conf.bat

            ===============================================================================

             

              JBoss Bootstrap Environment

             

              JBOSS_HOME: C:\jboss-as-7.0.0.Final\jboss-as-7.0.0.Final

             

              JAVA: C:\Program Files\Java\jdk1.6.0_26\bin\java

             

              JAVA_OPTS: -Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MaxPermSize=256M

            -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000

            -Dorg.jboss.resolver.warning=true -Djboss.modules.system.pkgs=org.jboss.byteman

            -server

             

            ===============================================================================

             

            10:31:07,299 INFO  [org.jboss.modules] JBoss Modules version 1.0.1.GA

            10:31:07,527 INFO  [org.jboss.msc] JBoss MSC version 1.0.0.GA

            10:31:07,573 INFO  [org.jboss.as] JBoss AS 7.0.0.Final "Lightning" starting

            10:31:08,299 INFO  [org.jboss.as] creating http management service using network

            interface (management) port (9990) securePort (-1)

            10:31:08,311 INFO  [org.jboss.as.logging] Removing bootstrap log handlers

            10:31:08,321 INFO  [org.jboss.as.connector.subsystems.datasources] (Controller B

            oot Thread) Deploying JDBC-compliant driver class org.h2.Driver (version 1.2)

            10:31:08,335 INFO  [org.jboss.as.clustering.infinispan.subsystem] (Controller Bo

            ot Thread) Activating Infinispan subsystem.

            10:31:08,435 INFO  [org.jboss.as.naming] (Controller Boot Thread) Activating Nam

            ing Subsystem

            10:31:08,446 INFO  [org.jboss.as.naming] (MSC service thread 1-7) Starting Namin

            g Service

            10:31:08,450 INFO  [org.jboss.as.osgi] (Controller Boot Thread) Activating OSGi

            Subsystem

            10:31:08,466 INFO  [org.jboss.as.security] (Controller Boot Thread) Activating S

            ecurity Subsystem

            10:31:08,471 INFO  [org.jboss.remoting] (MSC service thread 1-5) JBoss Remoting

            version 3.2.0.Beta2

            10:31:08,481 INFO  [org.xnio] (MSC service thread 1-5) XNIO Version 3.0.0.Beta3

            10:31:08,494 INFO  [org.xnio.nio] (MSC service thread 1-5) XNIO NIO Implementati

            on Version 3.0.0.Beta3

            10:31:08,678 INFO  [org.apache.catalina.core.AprLifecycleListener] (MSC service

            thread 1-3) The Apache Tomcat Native library which allows optimal performance in

            production environments was not found on the java.library.path: C:\Program File

            s\Java\jdk1.6.0_26\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:

            \Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Java\jdk1

            .6.0_26\bin;C:\Users\karth\Downloads\apache-maven-2.2.1\bin;C:\Wind

            ows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program

            Files\Common Files\Intel\WirelessCommon\;C:\Program Files\ThinkPad\Bluetooth So

            ftware\;C:\Program Files\ThinkPad\Bluetooth Software\syswow64;C:\Program Files\B

            roadcom\WHL\;C:\Program Files\Broadcom\WHL\syswow64;C:\Program Files\Broadcom\WH

            L\SysWow64\;C:\Program Files\Broadcom\WHL\SysWow64\syswow64;C:\Program Files (x8

            6)\Intel\Services\IPT\;C:\Program Files (x86)\Common Files\Lenovo;C:\Program Fil

            es (x86)\Common Files\Ulead Systems\MPEG;C:\SWTOOLS\ReadyApps;C:\Program Files\J

            ava\jdk1.6.0_26\bin\;;.

            10:31:08,687 INFO  [org.jboss.as.ee] (Controller Boot Thread) Activating EE subs

            ystem

            10:31:08,728 INFO  [org.jboss.as.jmx.JMXConnectorService] (MSC service thread 1-

            4) Starting remote JMX connector

            10:31:08,730 INFO  [org.jboss.as.remoting] (MSC service thread 1-8) Listening on

            /127.0.0.1:9999

            10:31:08,899 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread

            1-1) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080

            10:31:08,946 INFO  [org.jboss.as.connector] (MSC service thread 1-4) Starting JC

            A Subsystem (JBoss IronJacamar 1.0.0.CR2)

            10:31:08,982 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service

            thread 1-7) Bound data source [java:jboss/datasources/ExampleDS]

            10:31:09,220 INFO  [org.jboss.as.deployment] (MSC service thread 1-5) Started Fi

            leSystemDeploymentService for directory C:\jboss-as-7.0.0.Final\jboss-as-7.0.0.F

            inal\standalone\deployments

            10:31:09,223 INFO  [org.jboss.as.deployment] (DeploymentScanner-threads - 1) Fou

            nd Hello.war in deployment directory. To trigger deployment create a file called

            Hello.war.dodeploy

            10:31:09,237 INFO  [org.jboss.as] (Controller Boot Thread) JBoss AS 7.0.0.Final

            "Lightning" started in 2171ms - Started 92 of 147 services (55 services are pass

            ive or on-demand)

             

            Do you see any issues?

            • 3. Re: How to deploy a simple war file on JBOSS 7 ?
              jaikiran pai Master

              10:31:09,223 INFO  [org.jboss.as.deployment] (DeploymentScanner-threads - 1) Fou

              nd Hello.war in deployment directory. To trigger deployment create a file called

              Hello.war.dodeploy

              Looks like 7.0.0.Final expects a .dodeploy marker even for archives. I didn't really remember that was the case. Add a marker to trigger the deployment. Or use the latest AS7 nightly build http://community.jboss.org/thread/167590 which doesn't require marker files for archives.

              • 4. Re: How to deploy a simple war file on JBOSS 7 ?
                Kabir Khan Master

                10:31:09,223 INFO  [org.jboss.as.deployment] (DeploymentScanner-threads - 1) Fou

                nd Hello.war in deployment directory. To trigger deployment create a file called

                Hello.war.dodeploy

                Create that file

                1 of 1 people found this helpful
                • 5. Re: How to deploy a simple war file on JBOSS 7 ?
                  Kabir Khan Master

                   

                   

                   

                  Looks like 7.0.0.Final expects a .dodeploy marker even for archives. I didn't really remember that was the case. Add a marker to trigger the deployment. Or use the latest AS7 nightly build http://community.jboss.org/thread/167590 which doesn't require marker files for archives.

                  https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-DeploymentScanner

                  Change the value of the auto-deploy-zipped attribute

                  • 6. Re: How to deploy a simple war file on JBOSS 7 ?
                    Karthee Kholi Newbie

                    I added the marker and it works just fine. Thanks for the help