2 Replies Latest reply on Dec 29, 2011 11:25 PM by Brent Douglas

    Classloading with multiple EARs

    Mandar Kulkarni Newbie

      I have a couple of EARs deployed in JBoss 7 AS.

      App1.ear serves as a library to other EARs.

      App2.ear has following deployment XML,

       

      <jboss-deployment-structure>

                <ear-subdeployments-isolated>false</ear-subdeployments-isolated>

                <deployment>

                          <dependencies>

                                    <module name="deployment.app1.ear" export="true" />

                          </dependencies>

                </deployment>


                <sub-deployment name="app2_ejb1.jar">

                          <dependencies>

                      <!-- Is it required ??? -->

                                    <module name="deployment.app1.ear" />

                          </dependencies>

                </sub-deployment>

      </jboss-deployment-structure>

       

      JBoss throws following exception while deploying the applications.


      Failed to load module: deployment.app2.ear.app2_ejb1.jar:main

      Caused by: org.jboss.modules.ModuleLoadException: Could not load module deployment.app1.ear:main as corresponding module spec service deployment.app1.ear:main was not found.


       

       

      If childEAR depends on parentEAR and if the dependencies are specified accordingly in the XML, I would expect subdeployments of childEAR to wait untill parentEAR is successfully & completely deployed.

      Does my understanding contradicts the JBoss 7 classloading architecture ?

       

      Can someone provide a solution ?