5 Replies Latest reply on Apr 28, 2013 6:30 AM by john dorien

    EAR Deployment

    elkourah Newbie

      Hi,

       

      I am trying to install an application using ear deployment. 

      sometimes the deployment failed with exception  :

       

      10:18:54,632 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.subunit."atlasoss-application.ear"."atlascore-suivi-interface.jar".SwitchYardService: org.jboss.msc.service.StartException in service jboss.deployment.subunit."atlasoss-application.ear"."atlascore-suivi-interface.jar".SwitchYardService: org.switchyard.exception.SwitchYardException: Failed to lookup BeanDeploymentMetaData from BeanManager.  Must be bound into BeanManager.  Perhaps SwitchYard CDI Extensions not properly installed in container.

              at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:85)

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

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

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0]

              at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0]

      Caused by: org.switchyard.exception.SwitchYardException: Failed to lookup BeanDeploymentMetaData from BeanManager.  Must be bound into BeanManager.  Perhaps SwitchYard CDI Extensions not properly installed in container.

              at org.switchyard.component.bean.deploy.BeanDeploymentMetaData.lookupBeanDeploymentMetaData(BeanDeploymentMetaData.java:151)

              at org.switchyard.component.bean.deploy.BeanComponentActivator.lookupBeanMetaData(BeanComponentActivator.java:94)

              at org.switchyard.component.bean.deploy.BeanComponentActivator.activateService(BeanComponentActivator.java:57)

              at org.switchyard.deploy.internal.Deployment.deployImplementations(Deployment.java:450)

              at org.switchyard.deploy.internal.Deployment.start(Deployment.java:140)

              at org.switchyard.as7.extension.deployment.SwitchYardDeployment.start(SwitchYardDeployment.java:106)

              at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:78)

              ... 5 more

       

      NB : When deploying services as standalone  it deploys correctly

      I am using  switchyard-as7-0.7.0.Final

       

      Any tips?

       

      Regards,

      Hassan

        • 1. Re: EAR Deployment
          Keith Babo Master

          You mentioned the deployment fails "sometimes", so I want to confirm that you have been able to deploy a SwitchYard application with EAR packaging successfully.  Does the same app succeed and fail or is a certain app with EAR packaging that fails?  We do have a test for this in our release repository, but it's possible there's a case we are not covering.  If you have an application which can be used to reproduce the behavior that would be helpful.

          • 2. Re: EAR Deployment
            elkourah Newbie

            The deployment fails sometimes whith th same package and th same application.

             

            My application include many of BPM services , JMS bindiing services  and bean services

             

            it same like a  switchyard deployment order issue ?

             

            Here is my switchyard.xml file :

            • 3. Re: EAR Deployment
              Magesh Bojan Master

              I do remember seeing this error and/or some one mention it. Just couldn't place it where and when. I tried deploying a ear with a bunch of QS applications and do not seem to hit this issue. As Keith mentioned if you can get us a simplified version of your app that can produce this error that would help. Please attach your server log file in the meantime to have a look.

              • 4. Re: EAR Deployment
                elkourah Newbie

                Hi,


                Thank you for your reply.


                Adding
                <scope>provided</scope> for switchyard dependencies has resolved the problem.

                 

                Regards,

                Hassan

                • 5. Re: EAR Deployment
                  john dorien Newbie

                  Hi Keith,

                   

                  I have problem similar to issue described by elkourah.

                   

                  My application is deployed as EAR archive containing two JAR modules. Both modules are Switchyard applications. (Neither EAR or JAR is build by maven.) In few cases EAR deploys just fine. Usually it fails. I don't think that I added too much libraries to dependencies in jboss-deployment-structure.xml because if I merge my two JARs to single archive and deploy it in ear it works OK.

                   

                  I'm getting same error as described in original post:

                  SwitchYardService: org.switchyard.exception.SwitchYardException: Failed to lookup BeanDeploymentMetaData from BeanManager.  Must be bound into BeanManager.  Perhaps SwitchYard CDI Extensions not properly installed in container.

                   

                  Exception is thrown by: org.switchyard.component.bean.deploy.BeanDeploymentMetaData in method: lookupBeanDeploymentMetaData because set of beans returned by beanManager is empty.

                   

                  Behavior I'm observing is following:

                  1. I place break point to first statement
                  2. after deployment stops there I just run the code without any change.
                  3. deployment will succeed after this short pause in execution

                   

                  Another observation:

                  1. I place break point to the line where exception is thrown.
                  2. obtained set of beans had to be empty because otherwise no exception would be thrown.
                  3. But if I reevaluate getBeans method it returns exactly one bean.

                   

                  Therefore I think that deployment is somehow dependent on order of execution in different thread(s).

                   

                  More debugging lead me to class: SwitchYardCDIServiceDiscovery. This class is running in parallel with BeanDeploymentMetaData. But BeanDeploymentMetaData whats to find bean of type: BeanDeploymentMetaData before SwitchYardCDIServiceDiscovery creates it.

                   

                  What I'm not able to explain using debugger is why deployment succeed if there is only one JAR inside ear.

                   

                  Any ideas what might be wrong?

                   

                  Thanks,

                  John

                   

                  (I'm using  SY 0.8 and AS 7.2)

                   

                  EDIT: 28.4.2013 12:27

                   

                  This deployment problem might be caused by presence of persistence.xml. I have created ear to reproduce the problem. It consist of two quick starts JARs deployed as EAR. Without persistence.xml in test.ear/META-INF it deploys successfully. But with almost empty persistence.xml in ear it sometimes fails. (Both successful and broken deployment logs are in attached files.)

                   

                  In OK case deployment units were ordered like this:

                  12:10:47,670 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 25) JBAS011402: Starting Persistence Unit Service 'test.ear#test'

                  12:10:47,685 INFO  [org.switchyard] (MSC service thread 1-15) Deploying SwitchYard application 'switchyard-quickstart-camel-binding.jar'

                  12:10:47,670 INFO  [org.switchyard] (MSC service thread 1-10) Deploying SwitchYard application 'switchyard-quickstart-bpm-service.jar'

                   

                  NOK case order is:

                  12:13:16,603 INFO  [org.switchyard] (MSC service thread 1-3) Deploying SwitchYard application 'switchyard-quickstart-camel-binding.jar'

                  12:13:16,603 INFO  [org.switchyard] (MSC service thread 1-2) Deploying SwitchYard application 'switchyard-quickstart-bpm-service.jar'

                  12:13:16,603 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 17) JBAS011402: Starting Persistence Unit Service 'test.ear#test'

                   

                  Is it a bug or some missconfiguration on my site?

                   

                  jk