5 Replies Latest reply on Sep 3, 2013 3:39 AM by gamba

    Updating deployment with dependant

    ansur Newbie

      I'm faced with a certain deployment issue, for which I've created a small maven project (see attachment) so anyone can easily reproduce this behaviour.


      I have a scenario where I have two EAR deployments: base.ear and service.ear. The latter uses some services of the former. For this to work, it has all the necessary entries in its manifest.

      Once deployed, I can call the EJB from service.ear and the EJB from base.ear gets injected and used. No problems so far.


      This works fine, until I want to update base.ear.


      We have our own mechanism to update deployments (through the management API), but the same result can be achieved by deploying through the JBoss Admin console or JBoss CLI.

      So, when I update base.ear (just replace with the same base.ear file) it deploys fine and the invocation is successful. However, there's one line in the console which goes like:

      JBAS014777:   Services which failed to start:      service jboss.deployment.subunit."service.ear"."service-ejb.jar".FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."service.ear"."service-ejb.jar".FIRST_MODULE_USE: JBAS018733: Failed to process phase FIRST_MODULE_USE of subdepl

      oyment "service-ejb.jar" of deployment "service.ear"


      At this moment, the service.ear, and all its EJBs, isn't really deployed anymore. Or atleast, wrongfully deployed. Not sure how to call that state.

      One possibility is to invoke the :reload command (or restart the server), but ideally we'd like to not have this error in the first place.


      Is this caused by some misconfiguration or is this an actual problem of JBoss itself?

        • 1. Re: Updating deployment with dependant
          gamba Newbie

          We have the same problem with EA 6.0.1. Is this redeployment issue fixed with 6.1.0?

          • 2. Re: Updating deployment with dependant
            Tomaz Cerar Master

            Gamba wrote:


            We have the same problem with EA 6.0.1. Is this redeployment issue fixed with 6.1.0?

            It should be.

            • 3. Re: Updating deployment with dependant
              gamba Newbie

              I tried with EAP 6.1.0. After a redeployment the app1 to a running server my dependant EAR app2 throws still an error:


              14:33:15,218 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.deployment.unit."app2.ear".PARSE: org.jboss.msc.service.StartEx

              ception in service jboss.deployment.unit."app2.ear".PARSE: JBAS018733: Failed to process phase PARSE of deployment "app2.ear"

                      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

                      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

                      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_20]

                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_20]

                      at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_20]

              Caused by: java.lang.IllegalStateException

                      at org.jboss.as.webservices.util.ASHelper.getRequiredAttachment(ASHelper.java:162)

                      at org.jboss.as.webservices.deployers.WSIntegrationProcessorJAXWS_EJB.processAnnotation(WSIntegrationProcessorJAXWS_EJB.java:81)

                      at org.jboss.as.webservices.deployers.WSIntegrationProcessorJAXWS_EJB.deploy(WSIntegrationProcessorJAXWS_EJB.java:70)

                      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                      ... 5 more


              A reload or restart of the server solves this problem and the applications are now start in correct order (in former version 6.0.1 applications are not started

              in correct order after an redeployment).


              I guessed that this fixes the fromerly known redeployment error: https://issues.jboss.org/browse/AS7-5410

              In all ears I have a jboss-all.xml in META-INF-directory:


              <jboss umlns="urn:jboss:1.0">

                  <jboss-deployment-dependencies xmlns="urn:jboss:deployment-dependencies:1.0">

                      <dependency name="app1.ear" />



              • 5. Re: Updating deployment with dependant
                gamba Newbie

                Thank you for the link. I vote for it.


                Currently our nightly-build is broken, because of this issue.

                Reload with jboss-as-maven-plugin seems not to work after redeployment so I have

                to figure out a workaround ... with Ant or some some other plugin.