2 Replies Latest reply on Dec 23, 2012 1:50 PM by htfv

    JBoss AS 7.1.1 - package may not be deployed if beans.xml is added.

    htfv

      Hello everyone,

       

      we have a legacy application which was ported to JBAS 7 and may be deployed on JBoss AS 7.1.1. The application is an EAR with bunch of EJB JARs, a couple of persistent units, and a WAR inside. EJB 2 is still used extensively and web.xml has version 2.5.

       

      Now I develop a new piece of functionality and I put it into a new WAR. It uses EJB 3, JPA 2, and JAX-RS - all the new and shiny stuff. The new WAR may be deployed as a standalone application (for development and testing) or may be packaged into the EAR.

       

      It worked well until recently, when I added beans.xml to the new WAR. The WAR can be still deployed as a standalone application, but when I put it into the big EAR, deployment fails with cryptic messages. If I remove beans.xml from the new WAR, the application may be deployed, but obviously CDI is not available. I looked all my eyes through, but I could not find anything suspicios in the log (DEBUG level). It simply stops deployment at some point:

       

      15:03:03,040 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "mms_trunk.ear" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => [ ... [snip] ... ]"]}
      15:03:04,502 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-16) JBAS015877: Stopped deployment language-center-ui.war in 1494ms
      15:03:04,352 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment mmsEJB.jar in 1345ms
      15:03:04,352 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-10) JBAS015877: Stopped deployment mmsEJB2.jar in 1345ms
      15:03:04,352 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment ds.jar in 1345ms
      15:03:04,352 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment ejbJAR2.jar in 1345ms
      15:03:04,352 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-9) JBAS015877: Stopped deployment mmsServiceEJB.jar in 1345ms
      15:03:04,352 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Stopped deployment ejbJAR.jar in 1344ms
      15:03:04,352 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015877: Stopped deployment bd.jar in 1344ms
      15:03:04,342 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-12) JBAS015877: Stopped deployment mms-interop-jbossas-7.jar in 1333ms
      15:03:04,342 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-14) JBAS015877: Stopped deployment webservices.jar in 1331ms
      15:03:09,763 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment piMedia.war in 6752ms
      15:03:09,934 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-15) JBAS015877: Stopped deployment mms_trunk.ear in 6922ms
      15:03:09,954 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
      JBAS014775:    New missing/unsatisfied dependencies:
            service jboss.deployment.subunit."mms_trunk.ear"."bd.jar".component.CopyDseObjectService.START (missing) dependents: [service jboss.deployment.subunit."mms_trunk.ear"."ds.jar".INSTALL] 
            service jboss.deployment.subunit."mms_trunk.ear"."bd.jar".component.DatabaseManagementServiceImpl.START (missing) dependents: [service jboss.deployment.subunit."mms_trunk.ear"."ds.jar".INSTALL] 
            ...
            [half a thousand lines like the ones above]
            ...
            service jboss.naming.context.java.comp.mms_trunk.webservices.ReviewManagerSoapService (missing) dependents: [service jboss.naming.context.java.comp.mms_trunk.webservices.ReviewManagerSoapService.Validator, service jboss.naming.context.java.comp.mms_trunk.webservices.ReviewManagerSoapService.ValidatorFactory] 
            service jboss.persistenceunit."mms_trunk.ear/bd.jar#mms" (missing) dependents: [service jboss.deployment.unit."mms_trunk.ear".WeldService] 
            service jboss.persistenceunit."mms_trunk.ear/ds.jar#ds" (missing) dependents: [service jboss.deployment.unit."mms_trunk.ear".WeldService] 
            service jboss.web.deployment.default-host./trunk (missing) dependents: [service jboss.deployment.subunit."mms_trunk.ear"."language-center-ui.war".INSTALL] 
            service jboss.web.deployment.default-host./trunk.realm (missing) dependents: [service jboss.deployment.subunit."mms_trunk.ear"."language-center-ui.war".INSTALL] 
      

       

      The following 2 lines look strange to me:

       

            service jboss.persistenceunit."mms_trunk.ear/bd.jar#mms" (missing) dependents: [service jboss.deployment.unit."mms_trunk.ear".WeldService] 
            service jboss.persistenceunit."mms_trunk.ear/ds.jar#ds" (missing) dependents: [service jboss.deployment.unit."mms_trunk.ear".WeldService] 
      

       

      Also what is strange is that it seems that Weld is added to all modules (there is a "Adding dependency ModuleDependency ... org.jboss.weld.core" and a "Processing weld deployment" message for each module), though beans.xml only exists in the new WAR ("language-center-ui.war").

       

      Does anyone have a clue what's going on? I'm really lost here.

       

       

      Regards,

      htfv (Aliaksei Lahachou)