1 Reply Latest reply on May 6, 2016 11:27 AM by iampowers

    EJB References in Web App and Won't Deploy Unless EJB References Are Available

    iampowers Newbie

      I am on a WebSphere to JBoss migration project. We have a web application (call it WEB_A) that has EJB references to another EAR (call it EJB_B) deployed in the same server. WEB_A needs to be deployed before EJB_B to load cache. However, since WEB_A has EJB references in both web.xml and jboss-web.xml, it wants the EJBs in EJB_B to be available during deployment. If EJB_B isn't deployed, WEB_A fails during deployment complaining about missing/unavailable dependencies.

       

      Any clues on how to deal with the above situation?


      Details

      Server: JBOSS EAP 6.4


      web.xml

      <ejb-ref id="EJBRef_1">

              <ejb-ref-name>ejb/test/MyEJBMgrHome</ejb-ref-name>

              <ejb-ref-type>Session</ejb-ref-type>

      <home>com.test.MyEJBMgrHome</home>
      <remote>com.test.MyEJBMgr</remote>

          </ejb-ref>


      jboss-web.xml

          <ejb-ref>

              <ejb-ref-name>ejb/com/test/MyEJBMgrHome</ejb-ref-name>

              <jndi-name>java:global/APP/project/MyEJBMgr!com.test.MyEJBMgrHome</jndi-name>

          </ejb-ref>

       

      Deployment Error (edited for privacy)

          Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS014544: No EJB found with interface of type 'com.test.MyEJBMgrHome' for binding java:module/env/ejb/MyEJBMgr"},

          "JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"APP.ear\".deploymentCompleteService is missing [jboss.deployment.subunit.\"APP.ear\".\"APP.war\".deploymentCompleteService]"]

      }