3 Replies Latest reply on Jul 17, 2012 9:11 AM by jaikiran

    War packaged inside a Sar fails to deploy

    openmobster

      I have a sar file which contains a war file. The sar file deploys just fine. However, even after specifying the sub-deployment value I am getting the following error message:

       

      org.jboss.as.server.deployment.DeploymentUnitProcessingException: Sub deployment o.war in jboss-structure.xml was not found.

       

      Here is the overall structure of my sar file:

       

      openmobster.sar

                       | 3rd party jar files needed by the service

                       | o.war

       

      Here is my jboss-deployment-structure.xml

       

      <?xml version="1.0" encoding="UTF-8"?>

      <jboss-deployment-structure>

        <deployment>

           <dependencies>

             <module name="org.dom4j" />

             <module name="org.apache.commons.collections"/>

           </dependencies>

           <resources>

               <resource-root path="openmobster-sar-2.2-M8.jar">

               </resource-root>

            </resources>

        </deployment>

         <!-- war deployment -->

        <sub-deployment name="o.war">

        </sub-deployment>

      </jboss-deployment-structure>

       

      You help with this will be greatly appreciated

       

      Thanks

      Sohil

        • 1. Re: War packaged inside a Sar fails to deploy
          jaikiran

          Why are you packaging a war inside .sar instead of an .ear?

          • 2. Re: War packaged inside a Sar fails to deploy
            openmobster

            I thought if you are developing a service it should be a sar archive. Mine is a Mobile Cloud Service with features like Data Synchronization, Push Notifications etc. It is not a Java EE App. The war file is a web interface to the system and it relies on the dependencies of its parent which is the sar file.

             

            This setup worked great in JBoss-5.1.0.GA and something that I learned doing on JBoss Portal which also used to ship as a sar file packaged with numerous war files.

             

            I realize that JBoss AS 7 is a complete rework and things are completely new here. Does this mean that you cannot package war files inside a sar file in AS 7. If yes could please be able to tell me how to go about achieving it.

             

            Thanks

            Sohil

            • 3. Re: War packaged inside a Sar fails to deploy
              jaikiran

              You can just package the jboss-service.xml in the .ear/META-INF folder and also package the .war within that .ear. You don't need a .sar

              1 of 1 people found this helpful